We need you!

We're working hard on the next version of Developer Fusion. Let us know what you think we should be up to!

Members

Technology Zones

Articles

Hosted By

MaximumASP

Info

Rated
Read 122,824 times

Contents

Downloads

Related Categories

Building a Full-Featured Custom DataGrid Control - A Look Ahead

DMarko1

A Look Ahead

Just so we know our objective, I will quickly illustrate what we expect our page results to look like once we are done. To peer ahead, after reading this article, you will be able to create a search form page utilizing a custom datagrid control that includes paging, results display, and most importantly caching, that will look like this:

All from a Datagrid server control tag that looks like this:

<DMGrid:myCustDG ID="MyDataGrid" runat="server" autoCols="true" bgClr="Red" frClr="White" />

Pretty awesome! Incidentally, I had written an article covering data caching, and demonstrated a Cached Datagrid utilizing almost identical techniques discussed here. Be sure to read .NET Data Caching, Custom ASP.NET Datagrid Paging With Exact Count and Drilldown Datagrid Searching with ASP.NET for all the methods and techniques discussed here.

Therefore, before reading this article, take the time to download the source code, compile it and see it in action. See the results, then do a few custom modifications, recompile it, then view the result of your own modifications. By doing so, you should have no problem grasping the advanced techniques discussed and presented here, or with the how in creating your own customizations.

The manner in which this example is demonstrated (as a full search page) is just the way I happen to do it. There's a lot going on here, which is the reason why I want you to have a run through the code, and get a good idea of what's going on. This way, our objective in examining how easy a custom datagrid control can be created, and how easy your own customizations can be applied, is accomplished. So with all this in mind, let's begin by looking at everything taking place, from the top.

Dimitrios, or Jimmy as his friends call him, is a .NET developer/architect who specializes in Microsoft Technologies for creating high-performance and scalable data-driven enterprise Web and desktop applications. Till now Jimmy has authored nearly two dozen .NET articles, published on Dot Net Junkies, 4 Guys From Rolla, Sitepoint, MSDN Academic Alliance, Developers.NET, The Official Microsoft ASP.NET Site, and here on Developer Fusion, covering various unique and advanced techniques on .NET.

Comments

  • Re: [4676] Building a Full-Featured Custom DataGrid Control-Paging not working

    Posted by adwivedi1 on 09 Oct 2006

    Hi,

    I am building a ASP .NET composite control containing a datagrid during which I am 
    finding a problem while paging of the grid.

    The problem is for example if I am having three pa...

  • Building Custom Datagrid control

    Posted by hells_1999 on 02 Feb 2006

    I build my own custom datagrid control using the code from your site.

    I used this control as a reference in another aspx page at you have mentioned in your article.
    I have 400 total number of rec...

  • Posted by wrocca on 22 Dec 2005

    [quote][1]Posted by [b]taxiturner[/b] on 3 May 2005 10:25 PM[/1]
    LiteralControl lc = (LiteralControl) sender;
    DataGridItem container = (DataGridItem) lc.NamingContainer;
    lc.Text = ((DataRowView) co...

  • unable to update and sort on click

    Posted by myselfhemant on 22 Nov 2005

    I have created a Custom control using your article but i am having problem in sorting and update
    as i use a class which implements itemplate interface for this and create the function for update and...

  • selecting multiple items in a checkbox from a dat

    Posted by sneha123 on 31 Oct 2005

    There will be some 20 questions and for each question there will be 4 choices.what i want to do is to select multiple answers by clicking the checkbox. i m using asp.net,vb.net
    pls help me

    we ha...