473,386 Members | 1,741 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How can I extend the ASP.NET DataGrid ?

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>
Feb 11 '06 #1
3 1454
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...

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

Feb 11 '06 #2
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
Feb 11 '06 #3
Thanks to both of you. Much appreciated!

<Sonu Kapoor> wrote in message news:Ol**************@TK2MSFTNGP11.phx.gbl...
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

Feb 11 '06 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: sdhyok | last post by:
I think the two script should produce the same results, but not. Why? ---------------- Script #1 ls = ls.extend() print ls -> --------------- Script #2
0
by: Christian Dokman | last post by:
Hello, I have a datagrid and one column shows a lot of information. The text in that column is automatically cut of sometimes and I don't want that to happen. I would like to know if it is...
10
by: Jerzy Karczmarczuk | last post by:
Gurus, before I am tempted to signal this as a bug, perhaps you might convince me that it should be so. If I type l=range(4) l.extend() l gives , what else... On the other hand, try
2
by: Boobie | last post by:
I switched to using this function to create element: ---------------------------------------------------- function elem(name, attrs, style, text) { var e = document.createElement(name); if...
6
by: Grace | last post by:
Hello, I write a Web Application: its UI has a DataGrid controller. The web application gets huge data from SQL Server, then shows the result after processing these data. It needs much time to...
1
by: nate axtell | last post by:
I'm trying to extend the Height of Windows.Forms Datagrid's column headers. Is it possible to allow wrapping of text in the header column cells along with making the height larger?
1
by: aaa | last post by:
Im using a datagrid object to view data, Is it possible to extend selected row and show other details at the extended part of the row? If the answer is Y: Is it part of the datagrid's...
4
by: rick | last post by:
hi Is there a DB2 equivalent of Informix.Extend function? or please help me the best way to create one Thanks rick
3
by: jacobstr | last post by:
I've noticed Object.extend used in a few different ways and I'm having trouble distinguishing why certain usages apply to a given situation. On line 804 Ajax.Base is defined as follows: ...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.