473,386 Members | 1,736 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.

GridView Header

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
4 2496
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Miguel Dias Moura | last post by:
Hello, I have a GridView in my page which is created in runtime. It works fine. My page has 2 Asp Buttons: - The HIDE button makes GridView.Visible = False; - The SHOW button makes...
2
by: Flinky Wisty Pomm | last post by:
Hi all, I've got a really annoying problem that I need to fix sharpish. I've got a GridView derived control which has a templated header and footer. It works wonderfully on the first render but...
0
by: Elmo Watson | last post by:
OK - main gridview - gvTV In one column - I have another Gridview - gvTRPTV - function: Public Function AddTRPRow() As DataTable dtHeader = CType(ViewState("Header"), DataTable) If dtHeader...
0
by: DC | last post by:
The problem I'm using the .NET GridView and FormView objects for the first time and im getting the error "An OleDbParameter with ParameterName '@ID' is not contained by this...
8
by: gerry | last post by:
The PagerSettings.Visible property is not being handled properly by the GridView control. The value assigned to this property is not applied until after a postback. Simplest test : .aspx...
4
by: tirath | last post by:
hi, I want to display data in on my web page, in gridview in this format: Group A Group B A1 A2 B1 B2 Test 1 1 2 1 2 Test 2 1 2 1 2 Group A is header to columns A1 and A2...
2
by: Tim | last post by:
I'm using a GridView with its DataSource property set to a DataTable. During the RowDataBound event, the first row of the DataTable is reported as a DataControlRowType.Header instead of...
5
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I have a sub in vb.net that adds extra headers to a gridview and it works very well. however, i tried to translate it to c# and i'm getting the header inserting itself over the first datarows and...
7
by: rote | last post by:
I would like to make my Gridview header dynmic i.e databinded from database.. I want my users to be able to change the headers on the fly.. Any ideas?
2
by: gnewsgroup | last post by:
I have a GridView, in which the header of one column changes depending on the selected value of a DropDownList outside of this GridView. I did this dynamic header through protected void...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.