Details View And Form View Controls SRUTHIKA REDDY

  • Slides: 23
Download presentation
Details. View And Form. View Controls SRUTHIKA REDDY AINALLA PRESENTATION ID-27

Details. View And Form. View Controls SRUTHIKA REDDY AINALLA PRESENTATION ID-27

CONTENTS The Details. View Control. How To Add Command Buttons. Events Raised in Details.

CONTENTS The Details. View Control. How To Add Command Buttons. Events Raised in Details. View Control. Event Handler for the Item. Updated event. How to Create Template Fields. The Product Maintenance Application. The Default. aspx. cs File. The Form. View Control. The Item Format Template. Edit. Item and Insert. Item Templates.

The Details. View Control The Details. View control displays data for a single row

The Details. View Control The Details. View control displays data for a single row of a data source. Used in combination with a drop-down list or Grid. View control.

How To Add Command Buttons One way is to use the Add Field dialog

How To Add Command Buttons One way is to use the Add Field dialog box Code generated by the dialog box <asp: Command. Button=“True” Show. Delete. Button=“True” Show. Edit. Button=“True” Show. Insert. Button=“True”

How To Add Command Buttons Use HTML Editor to code the Command Field elements

How To Add Command Buttons Use HTML Editor to code the Command Field elements manually. Can add command buttons to let the user update, insert and delete data. Details. View Control does not provide a select button.

Events Raised in Details. View control

Events Raised in Details. View control

Event Handler for the Item. Updated event

Event Handler for the Item. Updated event

How to Create Template Fields Used to control the appearance of the fields in

How to Create Template Fields Used to control the appearance of the fields in a Details. View Control.

How to Create Template Fields

How to Create Template Fields

The Product Maintenance Application

The Product Maintenance Application

The Product Maintenance Application Uses a Grid. View control and a Details. View control

The Product Maintenance Application Uses a Grid. View control and a Details. View control to let the user update the date in a Products table. Select button is used to locate the product in the Grid. View control. Details for the product is displayed in the Details. View control. Edit button- to change the product data. Delete button- to delete the product. New button- to add a new product to the database

The Default. aspx. cs file Handles data base exceptions and concurrency errors for updates,

The Default. aspx. cs file Handles data base exceptions and concurrency errors for updates, deletions and Insertions. optimistic concurrency does not apply to insert operations.

The Default. aspx. cs file Item. Deleting method is used to apply a format

The Default. aspx. cs file Item. Deleting method is used to apply a format to a control that’s bound to the data source

The Form. View Control Similar to Details. View control, but its templates give you

The Form. View Control Similar to Details. View control, but its templates give you more control over how its data is displayed. Create and assign a Form. View control to a data source. Web Forms Designer will automatically create default templates for you. You can edit the templates to achieve the layout you want.

A Form. View control after a data source has been assigned.

A Form. View control after a data source has been assigned.

A Form. View control in templateediting mode.

A Form. View control in templateediting mode.

Difference between Form. View and Details. View Control. Form. View Control Details. View Control

Difference between Form. View and Details. View Control. Form. View Control Details. View Control It provides more formatting and layout options. It is easier to work with. It can use only templates with data binding expressions to display bound data. It can use Bound. Field elements or Template. Field elements to bound the data. It renders all the fields in a template as a single table row. It renders each field as a table row.

How To Work With the Item Template Used to display the data from the

How To Work With the Item Template Used to display the data from the data source in Read. Only mode. It consists of a literal header and a label control for each field in the data source. The Text attribute of each label control uses either a Bind or Eval method. The Eval method is used for columns that can’t be modified. Item Template include command buttons to edit, delete or add new rows.

The Item Format Template Generated for a Form. View Control

The Item Format Template Generated for a Form. View Control

Edit. Item and Insert. Item Templates Edit. Item Template determines how the Form. View

Edit. Item and Insert. Item Templates Edit. Item Template determines how the Form. View control renders in edit mode. It Includes a text box for each editable bound column in the data source. The Text attribute binds the text box to its data source column. It also includes Update and Cancel buttons. Insert. Item Template determines how the Form. View control is rendered in Insert mode.

Edit. Item template generated in a browser window.

Edit. Item template generated in a browser window.

The aspx code for the Edit. Item template.

The aspx code for the Edit. Item template.

THANK YOU

THANK YOU