By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,739 Members | 2,059 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,739 IT Pros & Developers. It's quick & easy.

GridView Header

P: n/a
How can I have a header like this:
[ demonstrations ]
[sales] [dns][not qualify]
having one row like colspan="3"

--

Bruno Alexandre
"a Portuguese in KÝbenhavn, Danmark"

Aug 23 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
I guess, you have use HeaderTemplate attribute to do this.
Let me explain you in case DataList ( or you can modify according the
control you are using, since the approach is same for all

<DataList ..>
<HeaderTemplate>
<Table>
<Tr>
<TD Colspan=3>Demonstrations</TD>
</Tr>
<tr>
<td>sales</td>
<td>dns</td>
<td>not quality</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<Tr>
<TD Colspan=3><%= Value %></TD>
</Tr>
<tr>
<td><%= Value %></td>
<td><%= Value %></td>
<td><%= Value %></td>
</tr>
</Itemtemplate>
</DataList>

Please note that I am trying to explain you the approach, but not the
actual code.

Do let me know if you have any trouble in implementing this code.

--
Vadivel Kumar
http://www.vadivelk.net
va**@online.vadivelk.net (remove "online.")

Bruno Alexandre wrote:
How can I have a header like this:
[ demonstrations ]
[sales] [dns][not qualify]
having one row like colspan="3"
Aug 23 '06 #2

P: n/a
well, that would be easy if I was using a DataList :-)

but i'm in a GridView, and GridView does not allow HTML injection like that
:-(

ohh well, I'm still looking 4 something.

--

Bruno Alexandre
"a Portuguese in KÝbenhavn, Danmark"

"Vadivel Kumar" <va******@vadivelk.netescreveu na mensagem
news:OB**************@TK2MSFTNGP05.phx.gbl...
>I guess, you have use HeaderTemplate attribute to do this.
Let me explain you in case DataList ( or you can modify according the
control you are using, since the approach is same for all

<DataList ..>
<HeaderTemplate>
<Table>
<Tr>
<TD Colspan=3>Demonstrations</TD>
</Tr>
<tr>
<td>sales</td>
<td>dns</td>
<td>not quality</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<Tr>
<TD Colspan=3><%= Value %></TD>
</Tr>
<tr>
<td><%= Value %></td>
<td><%= Value %></td>
<td><%= Value %></td>
</tr>
</Itemtemplate>
</DataList>

Please note that I am trying to explain you the approach, but not the
actual code.

Do let me know if you have any trouble in implementing this code.

--
Vadivel Kumar
http://www.vadivelk.net
va**@online.vadivelk.net (remove "online.")

Bruno Alexandre wrote:
>How can I have a header like this:
[ demonstrations ]
[sales] [dns][not qualify]
having one row like colspan="3"

Aug 23 '06 #3

P: n/a
I believe this article should be able to help you.

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

"Bruno Alexandre" wrote:
well, that would be easy if I was using a DataList :-)

but i'm in a GridView, and GridView does not allow HTML injection like that
:-(

ohh well, I'm still looking 4 something.

--

Bruno Alexandre
"a Portuguese in K√łbenhavn, Danmark"

"Vadivel Kumar" <va******@vadivelk.netescreveu na mensagem
news:OB**************@TK2MSFTNGP05.phx.gbl...
I guess, you have use HeaderTemplate attribute to do this.
Let me explain you in case DataList ( or you can modify according the
control you are using, since the approach is same for all

<DataList ..>
<HeaderTemplate>
<Table>
<Tr>
<TD Colspan=3>Demonstrations</TD>
</Tr>
<tr>
<td>sales</td>
<td>dns</td>
<td>not quality</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<Tr>
<TD Colspan=3><%= Value %></TD>
</Tr>
<tr>
<td><%= Value %></td>
<td><%= Value %></td>
<td><%= Value %></td>
</tr>
</Itemtemplate>
</DataList>

Please note that I am trying to explain you the approach, but not the
actual code.

Do let me know if you have any trouble in implementing this code.

--
Vadivel Kumar
http://www.vadivelk.net
va**@online.vadivelk.net (remove "online.")

Bruno Alexandre wrote:
How can I have a header like this:
[ demonstrations ]
[sales] [dns][not qualify]
having one row like colspan="3"


Aug 23 '06 #4

P: n/a
Hi Mike

4GuysFromRolla and GridViewGuy is my main websites, and I couldn't find this
articles :-/
(I personally hate the search function inside 4gfr, I always use Google with
the site:www.4.... )

but thank you very much...

the article describes how to insert rows and do what I need in rowItens
wicth is great, now I can search and test it do do that in the header :-)

Thank u once again

--

Bruno Alexandre
"a Portuguese in KÝbenhavn, Danmark"

"Mike Collins" <Mi*********@discussions.microsoft.comescreveu na mensagem
news:AB**********************************@microsof t.com...
>I believe this article should be able to help you.

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

"Bruno Alexandre" wrote:
>well, that would be easy if I was using a DataList :-)

but i'm in a GridView, and GridView does not allow HTML injection like
that
:-(

ohh well, I'm still looking 4 something.

--

Bruno Alexandre
"a Portuguese in KÝbenhavn, Danmark"

"Vadivel Kumar" <va******@vadivelk.netescreveu na mensagem
news:OB**************@TK2MSFTNGP05.phx.gbl...
>I guess, you have use HeaderTemplate attribute to do this.
Let me explain you in case DataList ( or you can modify according the
control you are using, since the approach is same for all

<DataList ..>
<HeaderTemplate>
<Table>
<Tr>
<TD Colspan=3>Demonstrations</TD>
</Tr>
<tr>
<td>sales</td>
<td>dns</td>
<td>not quality</td>
</tr>
</HeaderTemplate>
<ItemTemplate>
<Tr>
<TD Colspan=3><%= Value %></TD>
</Tr>
<tr>
<td><%= Value %></td>
<td><%= Value %></td>
<td><%= Value %></td>
</tr>
</Itemtemplate>
</DataList>

Please note that I am trying to explain you the approach, but not the
actual code.

Do let me know if you have any trouble in implementing this code.

--
Vadivel Kumar
http://www.vadivelk.net
va**@online.vadivelk.net (remove "online.")

Bruno Alexandre wrote:
How can I have a header like this:
[ demonstrations ]
[sales] [dns][not qualify]
having one row like colspan="3"



Aug 23 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.