Rowupdating how

If we could have accessed the Bind method ,that implicitly performs two-way binding, in the code-behind then we could have just override the Row Databound event and assigned the value to the gridview's checkbox control using the Bind method.

But unfortunately the Bind is not available in ASP. We could still achieve this in two simple and easy steps. Wrap the Eval(fieldname) HTML code in a function eg: Checkvalue that checks the datafield value, performs transformations to True OR False values and assigns to Chekced property. Override the Row Updating event of gridview and update only the Checked property's value since the SQLData Source that is bound to gridview will take care of remaining fields to update.

It allows a user to determine whether a fill operation should continue.The Row Updating event occurs when an Update method is called before a command executed against the data source.The Row Updated event occurs when a command executed.Td Command Builder can generate DML (UPDATE, DELETE and INSERT) statements for a single table SELECT statement.Td Command Builder uses the Select Command property of the associated Td Data Adapter to retrieve column information.He is the Editor of a Developer Magazine called DNC Magazine.

549

Leave a Reply