473,385 Members | 1,814 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,385 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 2495
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...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.