Rowupdating event of Free mom son chat
I came across a very interesting error while using buttons/link buttons in the Grid View for editing the Grid View rows data.
The exact situation I faced is like this – I have a Grid View with a column which contains an edit button.
Then in the code behind I have handled the On Row Command event.
In the event handler function I have checked for the Command Name property and write necessary code for each of the actions.
In this event, we have to add the Selected Value of C1Combo Box in the new Values collection of the eventargs.
The new Values collection of the eventargs is then used to add parameters in the Update Parameter collection of Update Command for Access Data Source to which C1Grid View is bound.
We will bind C1Combo Box in each row using the Row Data Bound event of C1Grid View.
Selected Value property is set to make the C1Combo Box show the value for that particular row from datasource.
and MSDN says that This event is analogous to the Validated event. Note A common mistake that a lot of people do is that they perform a databind each and every-time the Page_Load method is called.This will lead to problems like "Grid View does not show updated values", "Grid View looses values changed by user". In your Page_load, this is typically only inside a block where you check to make sure that Page_Load is not being called during a post-back call.The simplest solutions for this error is : Just change the “Command Name” property of the “Edit” button from “Edit” to “Edit Row”(or something else which is relevent to you but make sure it is not “Edit”). After scratching my head for sometime I found that the words like “Edit” are reserved to invoke some built in functionality of the Grid View.So when we use these special key words as the Command Name for the buttons in the Grid View, they automatically invoke the built in functionality of the Grid View when we click on the button.