Validating textbox in gridview
We'll create the inserting interface in Step 2.When creating a page that has two interfaces, only one of which is visible at a time, each interface typically is placed within a Panel Web control, which serves as a container for other controls.Learn how to insert multiple database records in a single operation.In the User Interface Layer we extend the Grid View to allow the user to enter multiple new records.For this tutorial, let s create an inserting interface that prompts for a single supplier and category value and then allows the user to enter up to five product names and unit price values.
Figure 2: Drag a Panel from the Toolbox onto the Designer (Click to view full-size image) Next, drag a Button and Grid View control into the Panel. Since this Grid View is used only to display data, set the drop-down lists in the UPDATE, INSERT, and DELETE tabs to (None).
As with the previous two tutorials, we will wrap the insertions within the scope of a transaction to ensure atomicity. This tutorial will consist of a single page that is divided into two regions: a display region and an inserting region.
The display interface, which we'll create in this step, shows the products in a Grid View and includes a button titled Process Product Shipment.
Click Finish to complete the Configure Data Source wizard.
Figure 3: Display the Data Returned from the Method (Click to view full-size image) Figure 4: Set the Drop-Down Lists in the UPDATE, INSERT, and DELETE Tabs to (None) (Click to view full-size image) After completing the Object Data Source wizard, Visual Studio will add Bound Fields and a Check Box Field for the product data fields. Also configure the Grid View to include paging and sorting support by checking the Enable Paging and Enable Sorting checkboxes in the Grid View s smart tag.