Gridview rowupdating dropdownlist findcontrol
I have created a class to implement itemplate for templatefield columns. When I bind my gridview in the rowediting event I get the following error: 'ASSIGNED TO' has a Selected Value which is invalid because it does not exist in the list of items. Perform Data Binding(IEnumerable data Source) at System. I worry it will still dont have your new value, but let`s try.The other solution is to drop that dynamic control creation and uses standard item and edit templates (declaratively in the aspx file) With just Build Grid() called, then the ddl is null.
Data Bind(Boolean raise On Data Binding) at System. Unfortunatley, I can't drop the dynamic creation, as this app is used to maintain three different systems, and being defined by an XML configuration file, means that the page can be used to maintain multiple tables.After investigation, it looks like the Selected Index Changed is not called because on the postback with update, the Drop Down List doesn't exists, therefore the event doesn't exist. Keys[zero-basedindexfromyourdatakeys] If that doesn't work... If it is, you may have to remove the leading character first. In the interim (before your answer) I have worked towards solving the issue (bit urgent, this site) and have converted the Bound Fields into Template Fields - as I know how to access those (or thought so).