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

Virtual Mode & Updating a single cell

Thread ID:

Created:

Updated:

Platform:

Replies:

23499 Jan 13,2005 01:31 PM UTC Jan 14,2005 12:01 PM UTC WinForms 5
loading
Tags: GridControl
Dominic Morris
Asked On January 13, 2005 01:31 PM UTC

I''m using the grid in virtual mode, and I''d like to update a single cell, i.e. I''d like to cause the QueryCellInfo event to fire for a given cell. How can I do this? thanks in advance, DM.

Administrator [Syncfusion]
Replied On January 13, 2005 02:18 PM UTC

Try calling grid.RefreshRange and pass in a GridRangeInfo.Cell object holding the cell.

Dominic Morris
Replied On January 14, 2005 09:20 AM UTC

Clay, As far as I can tell, that causes the event to fire for cells other than the one which I''ve invalidated. Our event handler performs an expensive cross-process function call; I''d like to be able to caus exactly one cell to be updated. Is it possible? DM.

Administrator [Syncfusion]
Replied On January 14, 2005 09:57 AM UTC

What version of our DLL''s are you using? In the grid\samples\quickstatr\virtualgrid sample, I add a button to the form with this handler.
bool showDebug = false;
Random r = new Random();
private void button1_Click(object sender, EventArgs e)
{
	Console.WriteLine("Start");
	showDebug = true;
	this.gridControl1.RefreshRange(GridRangeInfo.Cell(r.Next(5) + 1, 4));
	Console.WriteLine("End");
	showDebug = false;
}
I then add this if at the top of GridQueryCellInfo.
if(this.showDebug)
	Console.WriteLine("GridQueryCellInfo {0},{1}", e.RowIndex, e.ColIndex);
Here is what I see when I run this on the output page when I run the sample in the debugger with 3010. Start GridQueryCellInfo 1,4 GridQueryCellInfo 1,-1 GridQueryCellInfo -1,4 GridQueryCellInfo -1,-1 End First, the cellstyle for 1,4 is gotten, then the rowstyle, then the colstyle and finally the tablestyle. So, if you checked for e.RowIndex > 0 and e.ColIndex > 0, then your code would be hit once due to the grid.RefreshRange call. But QueryCellInfo will be triggerred just by moving your mouse over the grid. (You can see this with the above code by commenting out the if-statement so the WriteLine is always hit in the GridQueryCellInfo.) The grid needs the style under the mouse to do appropriate hittesting, etc base on the style of the cell. So, you may be seeing these hits as opposed to teh hits due to explicit calls to RefreshRange. Now earlier versions did have some problems with refreshing too much, but I think they have been resolved since 2.1.0.9 (?). In this 3010 sample, Syncfusion\Essential Suite\3.0.1.0\Windows\Grid.Windows\Samples\Performance\OneTimeOnlyQueryCellInfo, there is a technique that shows how you can have a grid where QueryCellInfo is only hit once. This might be of interest to you.

Dominic Morris
Replied On January 14, 2005 11:34 AM UTC

Thanks Clay, we are not using the latest version, but the one before that. What is the procedure for obtaining the latest version? What info. do we need to supply you in order to download the latest & greatest? thanks, DM.

Administrator [Syncfusion]
Replied On January 14, 2005 12:01 PM UTC

3010 should be available for download from your DirectTtac support home page. You will need a new key, but if you have an active support contract, you will be able to retrieve that via the web. If you have any problems with this procedure, you can email sales@syncfusion.com with your contact details and they can get things straightened out.

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

;