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. Image for the cookie policy date

Strange drawing in grid.

Hello! I have created sample, where occurs such problem. Sometimes after resizing grid columns or after sometime appear unwanted cells on unexisted columns (See StrangeDraw.zip). Where can be a problem? Best regards! RedrawGrid_7370.zip StrangeDraw_9866.zip

1 Reply

AD Administrator Syncfusion Team July 12, 2004 01:06 PM UTC

You can only access the grid (or any other Windows Forms control) on the thread that created it. The m_OnUpdate handler is being called from nonUI threads, so you have to recall it on the UI thread that created the grid.
private void m_OnUpdate(Manager m)
	Int32 row = m_Managers.IndexOf(m) + 1;
		this.gridControl1.BeginInvoke(new OnUpdateDelegate(m_OnUpdate), new object[]{m});
	gridControl1.RefreshRange(GridRangeInfo.Cells(row, 1, row, 5));

Live Chat Icon For mobile
Up arrow icon