Hi,
I am having a display issue with my gridDataBoundGrid. I am manipulating the column orientations in the grid_PrepareViewStyleInfo using something like this
if(e.ColIndex >= 1)
{
if (e.RowIndex == 0)
{
string strColumnName = this.grid.Binder.InternalColumns[e.ColIndex - 1].MappingName;
if (strColumnName.IndexOf(@"\") != -1)
{
e.Style.Font.Orientation = 270;
e.Style.WrapText = false;
grid.Model.RowHeights[0] = colHeaderHeight;
grid.Model.ColWidths[e.ColIndex] = colHeaderWidth;
}
}
}
if(e.ColIndex == grid.Model.ColCount && e.RowIndex == grid.Model.RowCount)
{
grid.Refresh();
}
When I run the application, the grid doesn’t display correctly sometimes (not always), as seen in the attached snapshot. When I select a cell in the grid or move to other window and come back to the grid window or hover on the mis-displayed cells/columns, the grid fixes itself.
I am forcing a grid refresh as shown in the above code. Which other event should I use for my refresh rather?
Can you please give me some advice on how I can fix this problem?
Thanks,
Ranu
GridDisplayIssue1.zip