hi can anyone tell me how to findcontrol in rowupdating event of gridview? Find Control("ddl1"); Drop Down List ddl2= (Drop Down List)grd Validations. im not gettin where i ve done wrong.pavankumar Hi pavankumarkavety I notice that the status of this thread is changed to “Resolved”. Grid View-Row Updating Event-Getting a reference to other columns.i ve written code like this Drop Down List ddl1= (Drop Down List)grd Validations. I am trapping the Row Updating event of the Grid View to provide more direct control over what I have to do.all good On update(edit) of an item in the lookup table I would like to also update any records of a main inventory table that contains the old lookup value. Specifically, how can I retrieve the initial column value from the gridview prior to edit to pass on to an updatecommand? I have been able to get whether the checkboxes have been checked or not with : CType(row. Checked However, what i would like to do in the click event of the delete button, is find out which checkboxes were selected and use the id (the one that is not presented to the user) and make the relevant changes in the database.Any help ..control in rowupdating event of gridview? Find Control("ddl2"); im able to get the value of second control but im not able to get the value of first control its returning me null...
Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free.
We’ll start with binding data to the Grid View, then build up functionality from there.
First, we’ll implement a method to databind the Grid View, which will be called whenever databinding needs to be performed.
Double click to the right of the Row Updating label to create the event in your code-behind.
Once you have the code-behind, use the following code to access the fields in the row being edited.
Format Exception was unhandled by user code Message="Input string was not in a correct format." Source="mscorlib" Stack Trace: at System. String To Number(String str, Number Styles options, Number Buffer& number, Number Format Info info, Boolean parse Decimal) at System. Parse Int32(String s, Number Styles style, Number Format Info info) at System.