Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > How can I extend the ASP.NET DataGrid ?

Reply
Thread Tools

How can I extend the ASP.NET DataGrid ?

 
 
Rick
Guest
Posts: n/a
 
      02-11-2006
If I create a class that inherits from the asp.net datagrid, and the
enhancements only relate to the codebehind, what does the grid's html look
like in design mode? I mean, whereas I might have an unadorned DataGrid as
such...

<ASPataGrid id="aspDataGrid" runat="server" ...
templates and stuff
</ASPataGrid>

and I create a class like so:

public class SuperGrid : DataGrid
{
...
}

can I write in the HTML designer:

<ASP:SuperGrid id="myGrid" runat="server"...
templates and stuff
</ASP:SuperGrid>


 
Reply With Quote
 
 
 
 
=?Utf-8?B?UGV0ZXIgQnJvbWJlcmcgW0MjIE1WUF0=?=
Guest
Posts: n/a
 
      02-11-2006
Rick,
The "SuperGrid"'s markup in the ASPX page should look identical to the
DataGrid class that you've derived it from, unless you have overridden any of
the Render methods.
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com




"Rick" wrote:

> If I create a class that inherits from the asp.net datagrid, and the
> enhancements only relate to the codebehind, what does the grid's html look
> like in design mode? I mean, whereas I might have an unadorned DataGrid as
> such...
>
> <ASPataGrid id="aspDataGrid" runat="server" ...
> templates and stuff
> </ASPataGrid>
>
> and I create a class like so:
>
> public class SuperGrid : DataGrid
> {
> ...
> }
>
> can I write in the HTML designer:
>
> <ASP:SuperGrid id="myGrid" runat="server"...
> templates and stuff
> </ASP:SuperGrid>
>
>
>

 
Reply With Quote
 
 
 
 
Sonu Kapoor
Guest
Posts: n/a
 
      02-11-2006
Besides Peters suggestion, I would recommend that you checkout the following article written by Scott Mitchell.

http://aspnet.4guysfromrolla.com/articles/072104-1.aspx

The article creates a new Datagrid called "PrettyDataGrid" which is extended from the normal DataGrid class.

Hope it helps.

Sonu Kapoor [MVP]
---
Posted via www.DotNetSlackers.com
 
Reply With Quote
 
Rick
Guest
Posts: n/a
 
      02-11-2006
Thanks to both of you. Much appreciated!

<Sonu Kapoor> wrote in message news:...
> Besides Peters suggestion, I would recommend that you checkout the
> following article written by Scott Mitchell.
>
> http://aspnet.4guysfromrolla.com/articles/072104-1.aspx
>
> The article creates a new Datagrid called "PrettyDataGrid" which is
> extended from the normal DataGrid class.
>
> Hope it helps.
>
> Sonu Kapoor [MVP]
> ---
> Posted via www.DotNetSlackers.com



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How long can one extend an audio cable? HC Computer Support 3 09-11-2005 08:14 AM
Extend the DataGrid 2 Sergio Florez M. ASP .Net Building Controls 0 11-29-2004 07:08 PM
Extend the DataGrid Sergio Florez M. ASP .Net Building Controls 1 11-29-2004 06:39 PM
Can you extend HtmlControls? Steve - DND ASP .Net 2 05-18-2004 04:47 AM
To all Gurus: How can I edit/update a DataGrid in a DataGrid (nested DataGrid)? Possible? Andreas Klemt ASP .Net Datagrid Control 0 10-08-2003 01:19 AM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57