By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
432,483 Members | 1,001 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 432,483 IT Pros & Developers. It's quick & easy.

DataGrid column header text painting problem

P: n/a
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
Share this Question
Share on Google+
3 Replies


P: n/a
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*******@discussions.microsoft.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

P: n/a
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*******@discussions.microsoft.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

P: n/a
Hi All,

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

Just setting the horizontalalignment 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*******@discussions.microsoft.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 discussion thread is closed

Replies have been disabled for this discussion.