Content Aggregated From: 4guysfromrolla.com

The GridView and DetailsView controls offer built-in editing functionality that can be turned on with the tick of a checkbox. Without writing a line of declarative markup or server-side source code, the page developer gets a decent out of the box editing interface. Namely, each field in the GridView or DetailsView is rendered in its editing interface; BoundFields display a TextBox control while CheckBoxFields display an enabled checkbox. Moreover, a CommandField is added, which displays the Edit, Update, and Cancel buttons, as needed. While the ListView control provides editing support, it requires a bit more work from the page developer to get it going. The reason is because the ListView is defined by templates whereas the GridView and DetailsView are defined by fields. Many fields types, such as the BoundField, can generate their own editing interface, but with templates the page developer is on the hook for specifying the editing interface. Creating an editable ListView control entails defining the editing interface via the EditItemTemplate and adding the Edit, Update, and Cancel buttons in the appropriate spots. This article walks through creating an editable ListView control, with the finished results available for download at the end of the article. Read on to learn more! ( It is assumed that the reader is familiar with how to edit data using a data source control. If this is not the case, please first read Accessing and Updating Data in ASP.NET: Updating Basics . ) Read More >


Read more…

Share and Enjoy:
  • Digg
  • Google
  • del.icio.us
  • Technorati
  • Facebook
  • MySpace
  • TwitThis
  • Blogsvine
  • description
  • E-mail this story to a friend!
  • Ping.fm
  • Print this article!
  • Slashdot
  • Yahoo! Buzz