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.

Grid Control does not paint the results

Thread ID:

Created:

Updated:

Platform:

Replies:

71220 Jan 22,2008 02:38 PM Jan 23,2008 03:19 PM Windows Forms 1
loading
Tags: GridControl
Deepak R Dubbolla
Asked On January 22, 2008 02:38 PM

Hello,

Some times i am getting the exception shown in the screen shot. as soon as i close the screen and load the screen again it loads properly.but i am not sure why this exception happening.

i am using Essential Studio 3.3.0.0

Environment VB.NET Windows Forms(VS.NET 2003).

Please let me know the cause and the solution if any.

Thanks & Regards,
Deepak R Dubbolla



Error.zip

haneefm [Syncfusion]
Replied On January 23, 2008 03:19 PM

Hi Deepak,

Normally this issue happens in the following reasons.
1) Recursive calls of the QueryCellInfo Event Handler
>>>>>>>>>>>>>>>>
Here is a sample that causing this issue (Recursive call of the Query cellinfo).
GridCrasher_653.zip

Step to reproduce the issue:
1)Double click the Rating Column cells
2)Double click the Cell(0,0) that causing the issue.

In the grid control, rowindex = -1 and colindex = -1 represents the table style. So you should wrap your code in the QueryCellInfo by checking this. Or else the style properties that are provided in the QueryCellInfo will try to apply for the entire table and this might lead to recursive calls of the QueryCellInfo. I think this is the cause of the problem.


private void gridControl1_QueryCellInfo(object sender, Syncfusion.Windows.Forms.Grid.GridQueryCellInfoEventArgs e)
{
if(e.RowIndex > -1 && e.ColIndex > -1)
{
/// CODE
///
}
}


Here is a modified sample.
Here is a modified sample.

2) Are you using multiple threads? If so accessing the grid on a different thread might cause this
>>>>>>>>>>>>>>
Any calls into the grid must be done on the thread that creates it, and you can use grid.InvokeRequired to check for this. Please refer the KB article for more details:
Can GridControl be used in a multithreaded application

3) If you are trying to swap/change a datasource for combobox columns when there was an active cell in the column that causes this issue.
4) If you are binding to any empty table that causing this issue
5) If you have handled any of the painting events like, DrawCell, CellDrawn, DrawCellDisplayText, ..., and have some exception raised in that drawing code that causing this issue.

Also refer to this forum thread.
http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=33668'>http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=33668">http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=33668

Please let me know if this helps.

Best regards,
Haneef



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.

;