DataGrid column header text painting problem

  • Thread starter Thread starter Shravan Kumar
  • Start date Start date
S

Shravan Kumar

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.
 
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.
 
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

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.

.
 
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

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.

.
.
 
Back
Top