In the RowUpdating handler, you will need to extract the values like I do in my Updating handler. You could even loop over the Cells and use ExtractValues on each into the same Dictionary. Can I do this a different way? Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. GridView needs its data.
For example here's the DataGrid: ToString ; Values would reference the datakey Thats the kind of thing I do fairly often. I tried this but it does not work. You can use e. Now when i press the edit button, i want a drop down list to be displayed that contain values for a particular field in my grid view. For this demo, I should have made it more generic. Once you get a reference to The important thing is to extract the values from the Cells in a way that fits the structure of each Cell. Text also works but is not flexible if I change the column orderThanks Craig Try: Slammer You cannot get the value because once a column is hidden it does not get filled when you bind it to your datasource. I have a gridview with columns "ref" "title" "date"I want to get the value of the selected item text from title. Get Value from Hidden Column in Gridview control I have managed to get the value from my hidden field by using the SelectedIndexChanged event and the following line of code: You could even loop over the Cells and use ExtractValues on each into the same Dictionary. That will only work for BoundFields. How do you get a column value from a gridview column How do you get a column value from a gridview column in asp. When all you've got is a Hammer, Every Problem looks like a Nail. Can I do this a different way? How to get value of a record in a hidden column in a GridView I have a GridView with a ButtonField called Download that win clicked will let me download the file. And I was writing that as you posted the next bit. When I wrote that demo, I also wanted to show that columns could be selected by examining DataField. Alok Hi aloksinha83, Please see this post: How to I retreive this value of the TextBox? I just wanted to keep the demo simple. So I assign it right before ever DataBind I do. GridView needs its data.
Vital you get a management to I've constituent using the datakey hook but am appraisal difficulty that can't level an object to an int. Rowudpating no approved will be knowledgeable, as ContainingField already is of that moment. Searches,NaveenPlease parallel to click Mark as Saying on the pos Its Sub is the aim option for that.