473,721 Members | 1,821 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DataGrid column header text painting problem

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, can you please give me a solution for it

Thanks,
Shravan.
Nov 15 '05 #1
3 3357
Hi,

Sounds like a bug in the DataGrid control. As a workaround, you could
probably set the column header text to an empty string when you make its
width equal to zero.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Shravan Kumar" <an*******@disc ussions.microso ft.com> wrote in message
news:03******** *************** *****@phx.gbl.. .
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, can you please give me a solution for it

Thanks,
Shravan.


Nov 15 '05 #2
Is there any chance of a other easy workaround, since I
have derived datagrid and used a lot of code to support
our functionality which will be disturbed if I use header
text changing dynamically.
-----Original Message-----
Hi,

Sounds like a bug in the DataGrid control. As a workaround, you couldprobably set the column header text to an empty string when you make itswidth equal to zero.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Shravan Kumar" <an*******@disc ussions.microso ft.com> wrote in messagenews:03******* *************** ******@phx.gbl. ..
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, can you please give me a solution for it

Thanks,
Shravan.


.

Nov 15 '05 #3
Hi All,

Thanks a lot for the concern, I have found a simple
workaround for the problem.

Just setting the horizontalalign ment of the column with
width 0 to left removed the painting problem

Shravan.
-----Original Message-----
Is there any chance of a other easy workaround, since I
have derived datagrid and used a lot of code to support
our functionality which will be disturbed if I use header
text changing dynamically.
-----Original Message-----
Hi,

Sounds like a bug in the DataGrid control. As a

workaround, you could
probably set the column header text to an empty string

when you make its
width equal to zero.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"Shravan Kumar" <an*******@disc ussions.microso ft.com>

wrote in message
news:03****** *************** *******@phx.gbl ...
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 whosewidth 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, can you please give me a solution for it

Thanks,
Shravan.


.

.

Nov 15 '05 #4

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

Similar topics

1
8907
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#" Codebehind="WebForm1.aspx.cs" AutoEventWireup="false"
1
1467
by: ordon | last post by:
Hi How show 2 lines text (column name) in datagrid | col name | | col name | +---------+ | row 1 | | row 2 | Thanks
3
4259
by: Richard | last post by:
I have a requirement to put a GDI style circle or rectangle border around the selected row of a datagrid/ It will overlap into the row above and below the selected row. Doing this in a the OnPaint of a subclassed DataGridTextBoxColum dos not seem like a practical way to do it. I have subclassed a DataGrid and overridden the OnPaint as such:
13
2495
by: pmcguire | last post by:
I have a DataGrid control for which I have also created several new extended DataGridColumnStyles. They behave pretty nicely, but I can't figure out how to implement Selected Item formatting for them. In a plain vanilla DataGrid, when you click on the RowHeader, the appropriate row changes colors. I ASSUME this should be done in the Paint (or PaintText) override of the DataGridColumnStyle in question. My problem is that I don't know...
4
2718
by: skOOb33 | last post by:
I successfully autosized the columns and rows on my Datagrid, and am now facing another issue. Having the sorting ability by clicking the column headers is key, but when I do that, it resizes all my rows back to their defaults. I populate the datagrid, resize it accordingly and it works fine...just when I click the headers is when it messes up. It would be fine if I could run my autosizing again after the sorting is done since there...
3
3542
by: TPhelps | last post by:
I have a sample of an unbound (autogeneratecolumns is true) sortable/pagable datagrid that works. I want to change one of the columns to a hyperlink. The examples I find use a bound column. I can get this to work; however, the column header on the datagrid is not a link/sortable. What am I missing? Thanks in advance.
1
1848
by: Jose | last post by:
Please como center a datagrid header and the data justify to right? Thanks a lot
5
2903
by: rn5a | last post by:
In my application, I want to populate all the directories & files existing in a directory on the server in a DataGrid. To ensure that all the directories get listed first followed by all the files, I am appending all the directories with 0 & all the files with 1. Moreover, each directory & file listed in the DataGrid will have a corresponding CheckBox. To differentiate between directories & files, I am adding the string "*D" (without the...
2
6592
by: =?Utf-8?B?Y3JlYXZlczA2MjI=?= | last post by:
I have a nested datagrid in a xaml file, the parent datagrid loads the vendor information and the details loads the documents for that vendor in a datagrid. Everything is working fine until I click in the child datagrid and then go to the combobox and choose another vendor. When the new vendor is loaded nothing shows in the datagrid but the itemsource shows the info is there. Know if I click on the child cell and then click back on the...
0
8837
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9366
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9214
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8005
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6668
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5977
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4751
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3187
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2572
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.