GGC and SelectedRecord/ GridRecord

Hi! I have a GGC and set the DataSource to DataView. After moving the CurrentCell, I get the selected data via ggc.Table.GetInnerMostCurrentElement(). No I set a new DataView as the DataSource. Visual there is still a row selected. But I can''t get the row! Neither via GetInnerMostCurrentElement() (==null) nor via ggc.Table.SelectedRecords (.Count==0). How can I get the selected GridRecord??? It seems there is no Record selected. Greetings Falk

1 Reply

AD Administrator Syncfusion Team March 13, 2006 10:00 AM UTC

Hi Falk, This can be achieved by moving the currentcell to the selected cell after changing the datasource. This happens, because the focus is lost as there is a change in the datasource. Here is the code snippet GridCurrentCell cc = this.gridGroupingControl1.TableControl.CurrentCell; int row = cc.RowIndex; int col = cc.ColIndex; this.gridGroupingControl1.DataSource = dt2; this.gridGroupingControl1.TableControl.CurrentCell.MoveTo(row,col); Regards, Madhan.

Loader.
Up arrow icon