Chapter 9. Editing the DataGrid Web Control

IN THIS CHAPTER

  • The DataGrid's Editing Interface

  • Editing Data with No Foreign Keys That Can Be Edited in a TextBox

  • Using Other Controls to Edit Data

  • Editing Data That Has Foreign Key Constraints

  • Adding Validation Controls to the Editing Interface

  • On the Web

The visitors to a Web site can typically be partitioned into two groups: the users of the Web site, and the administrators of the Web site. When talking about data-driven Web sites, typically the users are only allowed to view data, while administrators are allowed to edit, add, and remove data. For example, consider any popular e-commerce Web site. The users (shoppers) cannot add items to the Web site's database or adjust the prices or items; only administrators can perform these tasks. The users are limited to viewing the data and using it in predefined ways (such as adding a product to a shopping cart). In the past two chapters, we examined ways to enhance users' viewing of the data by providing sorting and pagination support.

How do administrators interact with the data to make edits, remove existing items, or add new ones? One way is to require them to log into the database server and issue the proper SQL INSERT, UPDATE, and DELETE SQL statements. However, such a requirement would allow only SQL-savvy individuals to be administrators, and would reduce the efficiency of data administration. In this chapter, we'll look at how to provide an enhanced editing user interface for administrators by providing mechanisms allowing the DataGrid's data to be edited. (We'll look at enhancing the user interface for adding and deleting records in Chapter 10, "Putting it All Together: A Real-World Example.")



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