Ask a Question related to ASP.NET General, Design and Development.
-
Bassel Tabbara [MSFT] #1
RE: DataGrid header and <TH>
Hello Vaclav,
You might use the HeaderStyle of the DataGrid which will create Th on the
client side. You can also attach style attribute to this
so you can format it the way you want. For more information refers to the
following documents:
DataGrid.HeaderStyle Property
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/[/url]
frlrfsystemwebuiwebcontrolsdatagridclassheaderstyl etopic.asp
DataGrid.ShowHeader Property
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/[/url]
frlrfsystemwebuiwebcontrolsdatagridclassshowheader topic.asp
Samples:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpqstart/ht[/url]
ml/cpsmpnetsamples-aspnetdataaccess.asp
Please let me know if you have any more questions on this.
Thanks,
Bassel Tabbara
Microsoft, ASP.NET
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
| From: "Vaclav Jedlicka" <vjedlicka@iol.cz>
| Subject: DataGrid header and <TH>
| Date: Wed, 25 Jun 2003 12:11:40 +0200
| Lines: 11
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <OKQ3cJwODHA.1364@TK2MSFTNGP10.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 195.47.25.99
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:154680
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Hello
|
| I have a DataGrid control an a page and I need the first row to have <TH>
| fields, not <TD>s, how can I achieve that?
| I need it because of a CSS which has attributes for <TH>s specified.
|
| Thanks in advance!
|
| Vaclav
|
|
|
Bassel Tabbara [MSFT] Guest
-
extra datagrid header...
I was wondering if there is a way I can add an extra header to a datagrid? I found this solution on the internet - but it seems quite old and... -
Removing the datagrid header.....
How to remove the datagrid header display ? Which property I should change ? Thanks -
datagrid header
Is it possible to have an overall header that spans across all columns? An example would be a class schedule for student Ben. |Ben |English ... -
get more control on datagrid header (?)
Dear all, I add more header's row on runtime using ItemCreate() and add DataGridItem(0, 0, ListItemType.Header) to get more header row. and... -
Fixed datagrid header,
Hi eveybody, I have a datagrid that can show many rows, so there is a vertical scrollbar. The problem is that when users scroll down, they loose... -
Bassel Tabbara [MSFT] #2
Re: DataGrid header and <TH>
Hello Vaclav,
DataGrid generates the styles tag if you enable GridLayout for the form
(which is the default). It uses the styles attribute to
Specify absolute positioning etc. If he does not want the Grid to generate
this then he will have to use a flow layout.
Please let me know if this answers your question.
Thanks,
Bassel Tabbara
Microsoft, ASP.NET
This posting is provided "AS IS", with no warranties, and confers no rights.
--------------------
| From: "Vaclav Jedlicka" <vjedlicka@iol.cz>
| References: <OKQ3cJwODHA.1364@TK2MSFTNGP10.phx.gbl>
<0uVASZ3ODHA.2496@cpmsftngxa06.phx.gbl>
| Subject: Re: DataGrid header and <TH>
| Date: Thu, 26 Jun 2003 09:34:34 +0200
| Lines: 91
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#dRnYW7ODHA.3700@tk2msftngp13.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet
| NNTP-Posting-Host: 195.47.25.99
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!tk2msftn gp13.phx.gbl
| Xref: cpmsftngxa06.phx.gbl microsoft.public.dotnet.framework.aspnet:155025
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
|
| Thank you for your reply.
|
| I was not able to switch the header from <TD> to <TH>s, so I am trying to
| attach class attribute to the header and setup the style from the CSS
file.
|
| But here I encountered another problem. The <TABLE> element which renders
| the datagrid in the browser has a style attribute. This is what I get:
|
| <table class="browse" cellspacing="0" cellpadding="0" border="0"
| id="DataGrid1" style="border-collapse:collapse;">
|
| Unfortunately the style attribute interferes with the CSS settings from my
| CSS file. I need to get rid of it. When I save the page as HTML and remove
| it, everything is OK. But how can I make the datagrid not to produce it? I
| tried various settings. I also tried this code, but no success:
| DataGrid1.Style.Clear();
|
| I think the look and feel should be specified from the CSS files and not
| from the code, so the datagrid should not generate any style attributes.
| Vaclav
|
|
|
| ""Bassel Tabbara [MSFT]"" <basselt@online.microsoft.com> wrote in message
| news:0uVASZ3ODHA.2496@cpmsftngxa06.phx.gbl...
| > Hello Vaclav,
| >
| > You might use the HeaderStyle of the DataGrid which will create Th on
the
| > client side. You can also attach style attribute to this
| > so you can format it the way you want. For more information refers to
the
| > following documents:
| >
| > DataGrid.HeaderStyle Property
| >
|
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/[/url]
| > frlrfsystemwebuiwebcontrolsdatagridclassheaderstyl etopic.asp
| >
| > DataGrid.ShowHeader Property
| >
|
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/[/url]
| > frlrfsystemwebuiwebcontrolsdatagridclassshowheader topic.asp
| >
| > Samples:
| >
|
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpqstart/ht[/url]
| > ml/cpsmpnetsamples-aspnetdataaccess.asp
| >
| > Please let me know if you have any more questions on this.
| >
| > Thanks,
| > Bassel Tabbara
| > Microsoft, ASP.NET
| >
| > This posting is provided "AS IS", with no warranties, and confers no
| rights.
| >
| >
| > --------------------
| > | From: "Vaclav Jedlicka" <vjedlicka@iol.cz>
| > | Subject: DataGrid header and <TH>
| > | Date: Wed, 25 Jun 2003 12:11:40 +0200
| > | Lines: 11
| > | X-Priority: 3
| > | X-MSMail-Priority: Normal
| > | X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| > | X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| > | Message-ID: <OKQ3cJwODHA.1364@TK2MSFTNGP10.phx.gbl>
| > | Newsgroups: microsoft.public.dotnet.framework.aspnet
| > | NNTP-Posting-Host: 195.47.25.99
| > | Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTN GP10.phx.gbl
| > | Xref: cpmsftngxa06.phx.gbl
| microsoft.public.dotnet.framework.aspnet:154680
| > | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet
| > |
| > | Hello
| > |
| > | I have a DataGrid control an a page and I need the first row to have
| <TH>
| > | fields, not <TD>s, how can I achieve that?
| > | I need it because of a CSS which has attributes for <TH>s specified.
| > |
| > | Thanks in advance!
| > |
| > | Vaclav
| > |
| > |
| > |
| >
| >
|
|
|
Bassel Tabbara [MSFT] Guest



Reply With Quote

