How can I extend the ASP.NET DataGrid ?

  • Thread starter Thread starter Rick
  • Start date Start date
R

Rick

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...

<ASP:DataGrid id="aspDataGrid" runat="server" ...
templates and stuff
</ASP:DataGrid>

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>
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top