Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
9791 | Jan 12,2004 08:58 AM UTC | Jun 13,2007 05:08 PM UTC | WinForms | 9 |
![]() |
Tags: GridControl |
////this code works...
//GridStyleInfo style = this.gridControl1.RowStyles[2];
//style.Font.Bold = true;
//style.BackColor = Color.LightGoldenrodYellow;
//so does this
GridFontInfo font = new GridFontInfo();
font.Bold = true;
this.gridControl1.RowStyles[2].Font = font;
private void ClearGrid(int nRowCnt)
{
Thread.Sleep(0);
this.m_oGrid.RowCount = 0;
this.m_oGrid.RowCount = nRowCnt;
this.m_oGrid.ResetVolatileData(); //added
}
private void foo(int nRow, bool bBold)
{
this.m_oGrid.Focus();
GridFontInfo oFont = new GridFontInfo();
oFont.Bold = bBold;
this.m_oGrid.RowStyles[nRow].Font = oFont;
this.m_oGrid.RefeshRange(GridRangeInfo.Row(nRow), true);
}
If you are looping through something filling the grid row by row, is it some kind of tight loop that precludes message processing? If so, you might try adding an Application.DowEvents call to see if that allows the painting to show up.
If you cannot get this resolved, the quickest way for us to be of help is if you attach a sample project showing the problem. (Or, you can submit a Direct Trac support incient with the sample).
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.
This page will automatically be redirected to the sign-in page in 10 seconds.