473,385 Members | 1,769 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.

How do I span the header text in a GridView (c#)

32
Hi,

I cant seem to find a way to do the above. I have 4 columns in a grid view. My HeaderTemplate consists of an asp:checkbox, I would like to add text to this checkbox rather than just a tooltip, but if I add text it makes my first column in the grid far too wide!

Im sure there is a way to do this!

Please help.

Thanks
Janet
Jun 22 '07 #1
3 2460
kenobewan
4,871 Expert 4TB
One way may be to fudge it with a table immediately above gridview. Otherwise I'm sure there some tricker way to add a first row and get it the dimensions that you want. HTH.
Jun 22 '07 #2
dixonjm
32
Thanks.

Im curious, again, what is HTH?

Found it - Hope this Helps!!!
Jun 22 '07 #3
nateraaaa
663 Expert 512MB
Hi,

I cant seem to find a way to do the above. I have 4 columns in a grid view. My HeaderTemplate consists of an asp:checkbox, I would like to add text to this checkbox rather than just a tooltip, but if I add text it makes my first column in the grid far too wide!

Im sure there is a way to do this!

Please help.

Thanks
Janet
You should be able to set the Width property of the HeaderTemplate to a specific width. You could also set the size property of the CheckBox text to a smaller size.

Give these a try and let us know if it works.

Nathan
Jun 22 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: JimO | last post by:
I'm new to CSS and I'm trying to figure out the difference between the Header tags, div, span, and p tags as they relate to style sheets. They each render slightly different in the browser and...
2
by: JimO | last post by:
I'm new to CSS and I'm trying to figure out the difference between the Header tags, div, span, and p tags as they relate to style sheets. They each render slightly different in the browser and...
1
by: sri_san | last post by:
Hello, I have a datagrid in which the header needs to span over 2 columns. I have tried creating a tableCells and tableRow at runtime and set the columnspan property of a cell to 2. But, the...
1
by: Olav Tollefsen | last post by:
Is it possible to create a DataGrid footer to span multiple columns? Olav
3
by: Hans Merkl | last post by:
Hi, I was wondering if it's possible to bind the header text of a GridView column to a method of an object I have. At the moment I am setting the header texts in Page_Load but I was wondering if...
0
by: Mortar | last post by:
i am trying to span header columns and am getting some problems. I have 13 columns in my datagrid (1 template, 12 bound), and for some reason, when i try to remove cells of index 11 or higher, it...
2
by: ricky | last post by:
Hello, If anyone could help me with this I would highly appreciate it. I've tried everything and nothing works. What I am trying to do is so damn basic and it's just frustrating that it seems...
8
by: fredd00 | last post by:
hi i'm trying to change the gridview columns header text the columns are not auto generated, i have set specific headertext values for each column i want to change the header text based on...
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?
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: 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: 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:
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
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,...
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.