We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

GridDataBoundGrid won’t render properly

Thread ID:

Created:

Updated:

Platform:

Replies:

67745 Aug 29,2007 09:53 AM Aug 29,2007 02:24 PM Windows Forms 1
loading
Tags: GridControl
Ranu Gupta
Asked On August 29, 2007 09:53 AM

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

Ranu Gupta
Replied On August 29, 2007 02:24 PM


just fixed the issue. Using QueryColWidth and QueryRowHeight events rather.

Thanks,
Ranu

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;