GRID VIEW CONTROL PG 468 477 DETAIL VIEW
- Slides: 33
GRID VIEW CONTROL (PG 468 -477) DETAIL VIEW & FORM VIEW CONTROLS (PG 481 -491) Group 1 CSCI 5633 01 Presentation ID 31
Outline § The Grid View Control Category Maintenance application Default. aspx file § The code-behind file § How to work with template fields § The Template version Category Maintenance application Default. aspx file § Details. View Control introduction § Details. View Control in depth § How to create a Master/Detail Page
Default. aspx file of Grid View Control
Default. aspx file of Grid View Control (cont)
The code-behind file § Must write code to insert data into Grid. View control to catch and handle any database or concurrency error that might occur § 3 Method in the file § btn. Add_click: § set the values of the three insert parameters to the values entered by the user § call the Insert Method of the data source control § Grid. View 1_row. Updated: § § § Called after a row has been update Check the exception property of the e argument. If the Exception. Handled property is set to True, the exception will be suppress. The Keep. In. Edit. Mode Property is set to True to leave the Grid. View control in edit mode If no exception happen, the e arguments Affected. Rows property is checked If it is zero, there is concurrency error and display error message
btn. Add_Click method • set the values of the three insert parameters to the values entered by the user • call the Insert Method of the data source control
Grid. View 1_row. Updated method • Called after a row has been update • Check the exception property of the e argument. • If the Exception. Handled property is set to True, the exception will be suppress. • The Keep. In. Edit. Mode Property is set to True to leave the Grid. View control in edit mode • If no exception happen, the e arguments Affected. Rows property is checked • If it is zero, there is concurrency error and display error message
Grid. View 1_Row. Deleted method • Called after a row has been deleted • Check if the exception been thrown • Check for concurrency error • No set Keep. In. Edit. Mode property to True becayse the control isn’t in edit mode when the Delete button is clicked
What are template fields? § What is a template field? § A template field is simply a field that provides one or more templates that are used to render the column § What is included in these templates? § You can include anything you want in these templates, including labels or text boxes, data binding expressions, and validation controls.
How to create template fields § The easiest way to create template fields is to first create a regular bound field and then convert it to a template field § This changes the Bound. Field element to a Template. Field element and, more importantly, generates Item. Template and Edit. Item. Template elements that include labels and text boxes with appropriate binding expressions. § Once the bound field is converted to a template you can edit it add any additional element including validation controls
How to create template fields (cont)
Grid. View Template Elements
A template field that includes a validation control
The product maintenance application
The Product maintenance Application
The Default. aspx file
How to use Detailsview control • Designed to display the data for single item of a data source • Work with drop down list
A Details. View Control that displays data for a selected product • Displays data for a single item of a data source. • Used with a drop-down list or Grid. View control. • Details. View Control with a drop-down list.
The aspx code for Details. View control • <asp: Details. View …> <Fields> Bound. Field /> <asp: </Fields> </asp: Details. View> • Data. Source. ID attribute specifies data source. • Bound. Field defines individual fields to be displayed.
Three modes of Details. View control
Details. View control attributes
Details. View child elements <asp: Details. View> <Fields> <asp: Bound. Field> <Header. Style Width=“ 125 px”/> <Item. Style Width=“ 325 px”/> </asp: Bound. Field> </Fields> </asp: Details. View>
Fields Child elements
Details. View control Paging • Move from one item to the next by using paging controls. • Data from only one row is displayed at a time. • A row of paging control is displayed at the bottom of the Details. View control.
What is Detail Page? § There are two ways to show information from the Data source: 1. Grid. View Data control 2. Drop-down list control
1. Grid. View Control
2. Dropdown list control
How to update the data in a Detail. View Control? § Command Buttons
§ Attributes to generate commands buttons
Command Buttons
- Bsa organization chart
- Convert 240 k and 468 k to the celsius scale
- Cs 468
- Minor details examples
- Major details and minor details
- Pin grid array
- Sw 477
- Akar pangkat 674
- Sr0fx
- Sepura *477
- Biba n 483 ddl
- Experiment 484
- Liedboek 477
- Ece 477
- Cse 477
- Logic solver
- Opwekking 477
- Akar pangkat dari 674
- Sifat sifat logaritma
- Ceng 477
- Ceng 477
- Jika log 2 = 0 301 nilai log 32 =
- Jika log 3 = 0 477 dan log 5 = 0 699 nilai dari log 45 =
- Ece 477
- Ece 477
- Oem grid control
- Rave electronic data capture
- Grid view in android
- Primary control vs secondary control
- Distinguish between process control and product control
- Fluids mechanics
- Stock control e flow control
- Control volume vs control surface
- Negative control vs positive control examples