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:
01171420
Views:
9
Kevin,

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()?

Thanks, Ted

>Bill,
>
>>I have a dropdownlist in a grid in an edititemtemplate. Edits always update the first row no matter which row that you're on. Textbox fields work properly.
>>The field that I'm working with is cmunit in table pricedet, bizobj=Pricedet.
>>Here's what have set on the dropdown:
>>BindingSource=Pricedet
>>BindingValueSource=Pricedet
>>BindingValueSouceMember=cmunit
>>CustomBinding Code Expression: Bind("cmunit")
>>I load the list in the init with a datatable but I've tried hard coding list and the results are the same.
>
>This is a web application? Are you using the GridView control? Are you saying that no matter which item in the combo box you select, it always stores the first item anyway?
>
>Best Regards,
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform