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): 41844/ 83

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

User Comments

Title: A test title   
Name: Hassan
Date: 2008-06-30 10:37:25 AM
Comment:
very good article.
Title: Awesome!   
Name: AzamSharp
Date: 2008-06-26 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: 2008-01-04 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






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


©Copyright 1998-2017 ASPAlliance.com  |  Page Processed at 2017-06-24 8:22:53 AM  AspAlliance Recent Articles RSS Feed
About ASPAlliance | Newsgroups | Advertise | Authors | Email Lists | Feedback | Link To Us | Privacy | Search