Using ASP.NET 3.5's ListView and DataPager Controls: Editing Data

Posted by: 4GuysFromRolla.com Headlines, on 10 Jun 2009 | View original | Bookmarked: 0 time(s)

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 >

Advertisement
Free Agile Project Management Tool from Telerik
TeamPulse Community Edition helps your team effectively capture requirements, manage project plans, assign and track work, and most importantly, be continually connected with each other.
Category: GridView | Other Posts: View all posts by this blogger | Report as irrelevant | View bloggers stats | Views: 1794 | Hits: 50

Similar Posts

  • Introducing Versatile DataSources more
  • How to display data from different tables using one data source more
  • Choose your preferred data layout with RadListView for ASP.NET AJAX more
  • Building a class browser with Microsoft Ajax 4.0 Preview 5 more
  • ASP.NET AJAX 4.0 Preview 5 released to CodePlex more
  • Self-reference hierarchy with Telerik TreeView for Silverlight more
  • Using Microsoft's Chart Controls In An ASP.NET Application: Plotting Chart Data more
  • Silverlight Release History : Q2 2009 (version 2009.2.701) more
  • WPF Release History : Q2 2009 (version 2009.2.701) more
  • Improving Dynamic Data with Peter's Data Entry Suite more

News Categories

.NET | Agile | Ajax | Architecture | ASP.NET | BizTalk | C# | Certification | Data | DataGrid | DataSet | Debugger | DotNetNuke | Events | GridView | IIS | Indigo | JavaScript | Mobile | Mono | Patterns and Practices | Performance | Podcast | Refactor | Regex | Security | Sharepoint | Silverlight | Smart Client Applications | Software | SQL | VB.NET | Visual Studio | W3 | WCF | WinFx | WPF | WSE | XAML | XLinq | XML | XSD