skip to content »

www.gazetaperekrestok.ru

Detailsview itemupdating cancel update

detailsview itemupdating cancel update-64

The Template Field offers a higher degree of flexibility in rendering data than the Bound Field, Check Box Field, Hyper Link Field, and other data field controls.

detailsview itemupdating cancel update-46detailsview itemupdating cancel update-11detailsview itemupdating cancel update-67

Such customization can be performed with the aid of a Template Field and a formatting method.In this tutorial we'll display one product at a time using a Details View that contains two Template Fields.The first Template Field will combine the , and "NO" otherwise.At this point you should see a single product listed (Chai) with rows showing the product's name, category, supplier, price, units in stock, units on order, and its discontinued status.Figure 3: The Product's Details Are Shown Using a Series of Bound Fields (Click to view full-size image) The Details View has a row for the Bound Fields into a Template Field.Alternatively, this markup can be entered directly in the declarative syntax.

Add the static markup, Label Web controls, and databinding syntax so that the Price and Inventory Template Field displays the price and inventory information like so: With these changes we've consolidated the price and inventory information into a single Details View row.

Open the properties and formatting properties for the Bound Fields as you see fit.

Like with the Grid View, these Bound Field-level edits can be performed through the Fields dialog box (accessible by clicking on the Edit Fields link in the Details View's smart tag) or through the declarative syntax.

Figure 8: The Price and Inventory Information is Displayed in a Single Row (Click to view full-size image) The , and so on, are implemented as Bound Fields.

The Check Box Field renders as a disabled checkbox that is checked if the data field's value is True and unchecked otherwise.

The returned value is what is displayed in this Details View row (see Figure 10).