Chapter 6. Using External Web Controls to Achieve Effects on the Web Control

IN THIS CHAPTER

  • Creating Filtering Buttons

  • Doing a Batch Update

  • On the Web

In the past two chapters, we examined how to add command buttons to the data Web controls. When adding a command button to a data Web control, the command button is placed in each row of the data Web control. This is useful if you want to associate some action with a particular row in the data Web control. For example, in the last chapter, we saw how to use a command button to add a Details button to each row in a DataGrid, DataList, or Repeater. When a particular row's Details button was clicked, the ASP.NET page would be posted back, and the details for the clicked row would be displayed.

There are situations, however, where we might not want one button for every row, but rather one button that affects the entire data Web control. For example, imagine that you have a DataGrid that displays a list of employees from your company's database. For each employee, there might be information like name, hire date, contact information, and department (such as sales, IT, executive, and so on). If your company has hundreds or thousands of employees, it would be difficult to find a particular employee if you simply list all the employees. To make using the list easier, you could provide a series of filtering buttons external to the DataGrid control. For example, there might be a Show All Employees in Sales button that shows only the sales employees.

In this chapter, we'll look at a couple of real-world scenarios in which external Web controls can be used to enhance the functionality and usability of a data Web control.



ASP. NET Data Web Controls Kick Start
ASP.NET Data Web Controls Kick Start
ISBN: 0672325012
EAN: 2147483647
Year: 2002
Pages: 111

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net