Rowupdating gridview newvalues black list dating
Right click on the Grid View and select "End template editing" Run the web form.
Click on the Edit button of the Grid View so that it goes into the edit mode.
In the Row Updating event handler, it fetches the Category Name data to which the textbox is bound to. Try something the gridview is bound to in your case Product [email protected] Vijay : I agree that its bad idea to enable any Id to be editable, but before going to my module i just create one table containing Prod ID and prod Name.
Note: Instead of using Text Box in normal mode use Labels.
This will convert them from Bound Field to Template Field.
Now from the smart tag of the Grid View choose "Edit Template" and then select "Edit Item Template" of Company Name column.
Next, drag and drop a Required Field Validation control below the Text Box.A Grid View Update Event Args object is passed to the event-handling method, which enables you to determine the index of the current row and to indicate that the update operation should be canceled. New Values collections are automatically populated only when the Grid View control is bound to data by using the Base Data Bound Control. To cancel the update operation, set the Cancel Event Args. Enter the database details as per your setup and click on OK.
On the next step select Customer ID, Company Name, Contact Name and Country columns (Figure 2).There can be several approaches taken for validating data. For our example we are going to use Customers table of Northwind database. Open its smart tag and choose "Configure Data Source" option to start Configure Data Source wizard.