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.

Checking cells in virtual mode

Thread ID:

Created:

Updated:

Platform:

Replies:

11210 Feb 26,2004 03:51 PM Feb 26,2004 05:19 PM Windows Forms 1
loading
Tags: GridControl
Desis Machino
Asked On February 26, 2004 03:51 PM

I need to implement a grid using virtual mode, however, when the event for QueryCellInfo gets called for a particular cell, I need to set its value according to a value already on the same grid. However, if I try accessing the other cell directly (using Grid[x,y]) I get a Recursive call detected exception. Also, if I set a cell to a particular value and set its tag to class, is there a way I can keep QueryCellInfo from trying to reload that cell. I tried checking the tag of the QueryCellInfoEventArgs passed in however it seems the cell object is always reset, even after it has been called once before. Thanks, and I hope I have explained myself clearly.

Administrator [Syncfusion]
Replied On February 26, 2004 05:19 PM

If it is a virtual grid, then the values for the grid should be coming from some outside dtatsource. So, in QueryCellInfo, why can you not retrieve the needed value directly from the outside datasource instead of trying to retrieve it by indexing the grid. Normally, you can avoid recursion in QueryCellInfo in the following manner. Suppose you need to know the value for grid[2,4] in QueryCellInfo. In this case, you can check for e.ColIndex == 4 and e.RowIndex ==2. If this is true, then the value you want (grid[2,4] is just e.Style.CellValue. If it is not true, then you can access grid[2,4] without triggering recursion. But this is only needed when the grid stores the data in its data object. When the data is from some external data source, you should try getting it directly from the data source, and not through the the grid with an indexer.

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.

;