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. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

"Ugly Red X" and Virtual Grid

Thread ID:

Created:

Updated:

Platform:

Replies:

19089 Sep 17,2004 10:22 AM UTC Sep 22,2004 10:36 AM UTC WinForms 5
loading
Tags: GridControl
Administrator [Syncfusion]
Asked On September 17, 2004 10:22 AM UTC

I am using (trying to use) a virtual grid using an ArrayList with custom objects in the array. The array is rather large (2000-3000 elements). The virtual grid is responding to the required events (QueryRowCount, QueryCellInfo, etc.) and the grid is painting just fine - all the events are firing and I am responding correctly to the "painting" events. In fact, everything is great when I use the arrow keys to move up and down the grid - painting is quick and reliable! However, within say 5-10 mouse clicks on the grid (it varies) my evil friend the "Ugly Red X" appears inside the grid boundaries. I can scroll up and down with the keyboard all day, but as soon as I start activating cells with the mouse all heck breaks out. What gives? Any silver bullets?

Administrator [Syncfusion]
Replied On September 17, 2004 10:32 AM UTC

Are you using multiple threads? If so, you must protect calls into grid methods using grid.InvokeRequired checks. Not doing so is a typical cause of th ebehavior you described. Here is a KB discussing this problem. http://www.syncfusion.com/Support/article.aspx?id=572 If you are not using multiple threads, then I am not sure what might be causing this behavior. The red x suggest that an exception is being thrown during the Paint. You can set the debugger to stop on exception and try to see if the call stack may give some clue. If you own the source code version, you can use the AssemblyManager to build a debug version and actually step into our code around any exception.

Administrator [Syncfusion]
Replied On September 17, 2004 10:40 AM UTC

Thanks for your quick response Clay. No, I am not using multiple threads and yes I do have the source code for EssentialGrid. I will use Assembly Manager as you suggest and see if I can spot where the exception is happening. Thanks. >Are you using multiple threads? > >If so, you must protect calls into grid methods using grid.InvokeRequired checks. Not doing so is a typical cause of th ebehavior you described. Here is a KB discussing this problem. http://www.syncfusion.com/Support/article.aspx?id=572 > >If you are not using multiple threads, then I am not sure what might be causing this behavior. The red x suggest that an exception is being thrown during the Paint. You can set the debugger to stop on exception and try to see if the call stack may give some clue. If you own the source code version, you can use the AssemblyManager to build a debug version and actually step into our code around any exception.

Administrator [Syncfusion]
Replied On September 17, 2004 10:54 AM UTC

Voila!!! Problems solved. Debug suggested that my index back into my ArrayList was throwing an exception - index was out of range. I am not checking for any e.RowIndex<0. Question: Why would the grid try and pass me a bad record index to my QueryCellInfo, and secondly, why is this behavior different for keyboard operations and mouse operations? >Thanks for your quick response Clay. > >No, I am not using multiple threads and yes I do have the source code for EssentialGrid. I will use Assembly Manager as you suggest and see if I can spot where the exception is happening. Thanks. > >>Are you using multiple threads? >> >>If so, you must protect calls into grid methods using grid.InvokeRequired checks. Not doing so is a typical cause of th ebehavior you described. Here is a KB discussing this problem. http://www.syncfusion.com/Support/article.aspx?id=572 >> >>If you are not using multiple threads, then I am not sure what might be causing this behavior. The red x suggest that an exception is being thrown during the Paint. You can set the debugger to stop on exception and try to see if the call stack may give some clue. If you own the source code version, you can use the AssemblyManager to build a debug version and actually step into our code around any exception.

Simon Spruzen
Replied On September 22, 2004 05:10 AM UTC

I''ve seen this too. I believe for a virtual grid, a row and/or col index of -1 indicates that the ''global'' style is required (i.e. the default for the grid not for a cell.). Just filter it out: 0 = header, 1..n = your data index + 1. Works well.

Administrator [Syncfusion]
Replied On September 22, 2004 10:36 AM UTC

e.ColIndex = -1 and e.RowIndex > 0 is a request for a rowstyle. The opposite situation is a request for column styles.

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.

Warning Icon 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.Close Icon

;