Home  About Us   Contact  Search   Tell A Friend   Resources  dotnetVideos Store Register  Login    
  August 21, 2008  
telerik_wpf2
FormatDLRptrBasedUponData    

Formatting the DataList and Repeater Based Upon Data: Step 1-Displaying Product Information in the DataList

This VIDEO TUTORIAL will demonstrate on how to format the data that is displayed with DataList and Repeater control based on the data itself. Whenever a DataList bound to a data source or programmatically through DataBind ( ) method, certain sequence of events occurs. In this sequence of events, first the DataList’s DataBinding event fires, data source is enumerated and each data record is bound to the DataList. In addition, DataList also creates DataListItem which is bound to the current record. During this process the DataList creates two event handlers ItemCreated and ItemDataBound. In order to demonstrate these events and to display the Product information in the DataList, the code from the Basics.aspx page is copied into Formatting.aspx page of DataListRepeaterBasics folder. Finally, the Repeater control that moved into this page from the Basics.aspx page is removed and the DataList’s product information display is examined at run time. For detailed information and source code for this step, please refer to the original article.

  View Video...

Formatting the DataList and Repeater Based Upon Data: Step 2-Programmatically Determining the Value of the Data in the ItemDataBound Event Handler

This VIDEO TUTORIAL will demonstrate on how to format data using an event handler of the DataList. For example, in this tutorial, our objective is to format the Product information displayed in the DataList, especially ProductName and UnitPrice are highlighted in yellow color for UnitPrice values less than $20.00. In order to accomplish this, an event handler for the DataList’s ItemDataBound is created and some custom code is written in this event handler to verify the values of UnitPrice column that satisfy our business rule from the ProductsRow instance. Once the UnitPrice column is found that satisfies the business rule of being not null and values less than $20.00, additional style classes will be applied to it and are explained in detail in the upcoming video. For detailed information and source code for this step, please refer to the original article.

  View Video...

Formatting the DataList and Repeater Based upon Data: Step 3-Highlighting the Product’s Name and Price

This VIDEO TUTORIAL will elaborate on how to apply style classes in the DataList’s ItemDataBound event handler when the UnitPrice value is NOT null and is less than $20.00. The highlighting of ProductName and UnitPrice labels in yellow color is achieved by applying ‘AffordableEmphasis’ style class of the Style.css file of the Data Tutorial project. In addition, an alternative of creating and applying formatting function and calling it from DataList ItemTemplate is also demonstrated. Finally, a demonstration of highlighting the Product’s name and Price at runtime is examined. For detailed information and source code for this step, please refer to the original article.

  View Video...

telerik_wpf2
  Copyright 2008 by dotnetvideos.net   Terms Of Use | Privacy Statement