
Custom Formatting Based Upon Data: Step 3:
Formatting the UnitPrice Value in the DetailsView
This step of the VIDEO TUTORIAL will provide the custom code for the DataBound event-handler of the ExpensiveProductsPriceInBoldItalic’ DetailsView data web control. Basically, a demonstration of custom code on how to retrieve each DataItem of the DetailsView control to check the UnitPrice attribute value will be made. The UnitPrice can be formatted to display bold and italic letter for its value, if the UnitPrice exceeds $75.00. This can be done by controlling the font attribute of the row property of ExpensiveProductsPriceInBoldItalic’ DetailsView control or by applying a newly added style sheet class (ExpensivePriceEmphasis) from Style.css file of our project. Following this the run time display of the CustomColors.aspx web page would display the UnitPrice in Italic and Bold fonts; if the product’s Unit Price value exceeds $75.00. For detailed information and source code for this step, please refer to the original article.
This video presentation is available ONLY for REGISTERED users of this web site due to significant costs associated with data transfer of multimedia content. Please register to view this video. Registration is FREE of charge and takes less than a minute to complete. Thanks for your consideration.
---Administrator