GGC: Record.BeginEdit()

Hi,

I want to use the Record.BeginEdit() to update my GGC when data comes through (using BeginEdit(), the grid displays the changes much quicker than not). However, this will set the record to the current record. Is there a way to accomplish this and keep the performance, while not setting the record to current. I want the current record to change only by the user, not by the incoming data.

Many thanks.


2 Replies

PC Patrick Cheng December 13, 2007 09:58 AM UTC

i have tried the following as well:

this.gridGroupingControl1.SourceListListChanged += new TableListChangedEventHandler(gridGroupingControl1_SourceListListChanged);

private void gridGroupingControl1_SourceListListChanged(object sender, TableListChangedEventArgs e)
{
e.ShouldResetCurrentRecord = false;
e.ShouldIgnoreReset = true;
}

however, this gets triggered AFTER the Record.EndEdit() is called.



AD Administrator Syncfusion Team December 13, 2007 01:00 PM UTC

I think using BegEdit/EndEdit will only slow things down. I do not think adding it will speed things up even if the current record does not change.

If the changes are made to the datasource from outside the grid, the grid should just handle this changes automatically and you should not have to do anything (this is assuming your datasource is a IBindingList object as the grid listens to IBindingList.ListChanged to monitor and react to external changes to the datasource).

If you are making changes directly through the grid object, then doing record.BeginEdit and record.EndEdit slows things down.

Here is a little sample that has 2 buttons, one doing 500 updates directly to the datasource and the other doing 500 updates through the GridRecord. This second test case allows you to optionally call Begin/EndEdit. And using Begin/EndEdit is by far the slowest behavior.



WindowsApplication19.zip

Loader.
Up arrow icon