Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Databinding to a dropdown list in a grid not working
Message
General information
Forum:
ASP.NET
Category:
The Mere Mortals .NET Framework
Miscellaneous
Thread ID:
01170921
Message ID:
01171653
Views:
10
Ted,

>I believe Bill may be having the same problem I am (ASP.net). No matter which row I edit in a GridView, the first row is updated. This is why I was asking about setting the current row of the entity in the RowUpdating(). While you are looking in that area please review the data binding of a template dropdownlist in a Gridview. I was never able to get this to work so I had to hard code the items also until this is resolved. Until then I am learning more by having to code around these surprises.
>
>While on the dropdownlist control: What is the best method to evaluated the current value selected is such a dropdownlist from RowUpdating()?

Did you do this in your grid?

To get the dropdownlist's currently selected value to bind, edit the template column's data bindings (by clicking the smart tag on the template column) and in the DataBindings dialog, select the "Custom Binding" option and enter an expression like this:

Bind("NameOfTheColumn")

Best Regards,
Kevin McNeish
Eight-Time .NET MVP
VFP and iOS Author, Speaker & Trainer
Oak Leaf Enterprises, Inc.
Chief Architect, MM Framework
http://www.oakleafsd.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform