473,569 Members | 3,015 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Header width in datagrid

Hi,
Is there any way to adjust the header width to the name of the column
from the database. Right now all my columns are set by
preferedcolumnw idth. Is there a way that my column headers will display
whole column name from the database, which means that they will have
different width?
I know that I can manipulate that programatically column after column,
but can I achieve that automatically which would be usefull in case of
many columns.

Thank you
Schapopa

*** Sent via Developersdex http://www.developersdex.com ***
Jan 6 '06 #1
0 872

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3344
by: Shravan Kumar | last post by:
Hi, I am using my code to set column widths of datagrid columns dynamically, but when I am setting the column widths to zero, the header text of the column whose width is made to zero is appearing on the existing column headers, and the text gets blurred with the painting of the column text along with the adjacent width 0 column. Anybody,...
1
8900
by: Webgour | last post by:
Hi, I'm tring to add a column to a datagrid with a linkbutton as header that can be used to sort the column. The column and the linkbutton are added programmatically (see below). However the problem is that when you click the added column header it doesn't trigger the sort. The code : <%@ Page language="c#"...
4
5669
by: Tim | last post by:
Hi, I am trying to hide the datagrid row header (the left most column that has the 'select' triangle in it which moves with the selected row). It seems to be fairly simple; this.dgStockMasterSummary.RowHeadersVisible = false; however it doesn't hide it. Hiding the column headers works just fine. Does anyone have any ideas?
0
1187
by: Stanley Alex | last post by:
I am having a problem with the way my DataGrid displays when a column header is clicked on to sort records. When the column name is clicked, a white background appears behind the column name. Also, if the column name has two words, if they were displayed one on top of the other, they now are displayed on one line and the text will not wrap. ...
2
1603
by: Herry | last post by:
Hi all, I have problem with datagrid in asp.net using vb as the language. This is how I show the datagrid from database datagrid1.datasource = dataset1 datagrid1.DataBind() Is there any possibility to change the header on every column and how to set the column width
6
2185
by: tshad | last post by:
I have a datagrid where each column has both a label and a linkbutton. I need to have the label left justified and the linkbutton right justified. In HTML, I would have to set up 2 cells to do this. Is there a way to accomplish this in a DataGrid (and have the text span both columns). What I have is:
0
2614
by: cedoucette | last post by:
I just wrote code to support sortable columns in a datagrid. It seems to work fine; but, it doesn't look right. The problem is that I have a generic style for links and a different style for the header row - and they conflict. The sortable column apparently uses the generic style for <a> elements and the rest of the header uses "headerRow". ...
4
2447
by: Grace | last post by:
I use a datagrid included in a repeater. as following: (.aspx) <asp:repeater id="rp_perform" Runat="server"> <HeaderTemplate> <table border="0" bgcolor="gray" cellspacing="0" cellpadding="0"> </HeaderTemplate> <ItemTemplate> <tr bgcolor="white"> <td width="100%">
0
1471
by: upendra | last post by:
Hi, I am B.V.Ramesh Babu.I am working as software programmer using .net.We are using asp.net1.1 with C#.net as coding.I hope that i will get the required support from you. Here is my requirement. I am using datagrid control.In that data grid I put checkboxes in both item templete and in Header templete.My requirement is is if i check any...
2
12916
by: dfdavis.mtu | last post by:
I have a table that I dynamically fill with data from a database for medical companies to be able to determine if their patients meet certain criteria. However they want a fixed header for it so they can keep track of the criteria as they scroll since there can be upwards of 1000 or more patients in the table. The way I got this to work was...
0
7930
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8138
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
6290
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5228
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1229
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.