Creating Custom Data Field Controls - Part 1
page 1 of 5
Published: 04 Jan 2008
Abstract
This article discusses the basics of creating custom data control fields that can be used in the ever popular GridView and DetailsView controls. It will also show you a base class that Brian uses to simplify this process altogether.
by Brian Mains
Feedback
Average Rating: This article has not yet been rated.
Views (Total / Last 10 Days): 14731/ 216

Introduction

There are a few controls in the .NET Framework that support bulk amounts of data. All controls can contain some sort of data, but to show groups of data, to paginate or sort it, and perform some sort of analysis limits the number of control support to the GridView, DetailsView, DataList, and a few others. However, some of these controls are limited in their capability, meaning that out-of-the-box does not always cut it.

For the GridView, the TemplateField provides some flexibility. However, having to repeat templates in several places quickly challenges reusability. But, controls like the GridView allow for minor customizations by allowing the developer to reuse specific pieces within its grid, rather than having to recreate a custom control itself. This can be done simply by creating a new custom control that inherits from DataControlField.

So, the focus of this article will be to create extensibility by making the development of custom data fields easier, and show you how to do so. It is good to reflect on how this entire process works, which is the essential piece of this article.


View Entire Article

Article Feedback

Title:  
Name:  
Url: ( Optional )
Comment:  
Please add 3 and 2 and type the answer here:

User Comments

Title: A test title   
Name: Hassan
Date: 6/30/2008 10:37:25 AM
Comment:
very good article.
Title: Awesome!   
Name: AzamSharp
Date: 6/26/2008 12:17:36 AM
Comment:
Hi,

Very nice article! I think I am going to look into creating some custom data field controls myself.
Title: Nice article   
Name: Joydip Kanjilal
Date: 1/4/2008 12:16:56 PM
Comment:
Nice article Brian.

Thanks,

Joydip

Author: ASP.NET Data Presentation Controls Essentials (Packt Publishing)

http://www.packtpub.com/asp-net-data-presentation-controls/book

Product Spotlight
Product Spotlight 
Learn More
.NET Tools
asp.net shopping cart
asp.net chart control






Community Advice: ASP | SQL | XML | Regular Expressions | Windows


©Copyright 1998-2008 ASPAlliance.com  |  Page Processed at 11/22/2008 2:36:27 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search