Vb net gridview rowupdating

6854933580_2c8b688306_z

Template Fields, which were the topic of discussion in the Using Template Fields in the Grid View Control and Using Template Fields in the Details View Control tutorials, can consist of multiple templates defining separate interfaces for different row states.

The Template Field's to provide a more foolproof user interface.

The following markup shows the declarative syntax for the By clicking the "Convert this field into a Template Field," Visual Studio has created a Template Field whose templates mimic the user interface of the converted Bound Field.

You can verify this by visiting this page through a browser.

The Compare Validator's Figure 8: An Asterisk Appears Next to the Textboxes with Invalid Input (Click to view full-size image) While the validation works as-is, the user has to manually remove the currency symbol when editing a record, which is not acceptable.

To remedy this, we have three options: Statement (Click to view full-size image) With this change, the formatted price in the editing interface includes commas as the group separator and a period as the decimal separator, but leaves off the currency symbol.

In order to provide a customized editing or inserting interface, we need to replace the Bound Field or Check Box Field with a Template Field.

After setting these three properties of the Required Field Validator, your screen should look similar to Figure 7.

Figure 7: Set the Required Field Validator's After making these changes, open the page in a browser.

Similarly, when inserting a new record into a Details View control, those Bound Fields whose (the default) are rendered as empty textboxes, into which the user can provide the new record's field values.

Likewise, Check Box Fields, which are disabled in the standard, read-only interface, are converted into enabled checkboxes in the editing and inserting interfaces.

For more information on the new validation control features in 2.0, refer to Dissecting the Validation Controls in ASP. From here, you can select which template to edit from the drop-down list.

You must have an account to comment. Please register or login here!