Thanks Haneef,
I need to use Record Based Selection, so my issue is that I need to do this:
1) Save the ‘SelectedRecord’ object using this code:
_selectedRecord = grid.GetTable(tableName).SelectedRecords[0].Record;
2) Refresh the data in the GGC
3) Set the ‘SelectedRecord’ back to the grid using this code(??):
grid.GetTable(tableName).SelectedRecords.Add(_selectedRecord);
The problem is that the '_selectedRecord' variable is cleared (set to NULL) in Step #2. How can I "preserve" the selected record data during a refresh and then set the selected record back to the GGC after the refresh is done?
Thanks again :)
Dave Busch
>Hi Dave,
Regarding refresh Issue:You can try setting TableDirty and SummariesDirty properties to refresh the data in a grid.
groupingGrid.Table.TableDirty = true;
groupingGrid.Table.SummariesDirty = true;
TableDirty = true indicates to the engine that it needs to recategorize elements and refresh counters and summaries the next time it is painted or the the next you want to access a record or summary information.
Selection Types:The GridGroupingControl has two types of selection mode.
Type 1: Row based selection
This selection support can be turned on by setting the grid.tableOptions.AllowSelections to something other than None. This selection functionality raises events like the grid.TableModel.SelectionChanging/Changed.
[c#]
this.gridGroupingControl1.TableControl.Selections.Add(GridRangeInfo.Row(3));
Type 2: Record based selection
This selection support is turned on by setting the grid.TableOptions.AllowSelections to None and setting the grid.TableOptions.ListBoxSelectionMode to something other than None.
[c#]
this.gridGroupingControl1.Table.SelectedRecords.Add(record);
Please refer to the following KB article for more details.
http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=344Best regards,
Haneef