Navigating in a GGC

Hello: I have a GGC with only one selectable row, and I would like to know which is the best way to navigate programatically between the rows in a GGC, typical Go First, Go Previous, Go Next and Go Last. I have problems when my GGC is grouped by some columns, and sometimes when I change the cursor to a different row, previous row stays selected in its group. I can''t tune it fine. Thanks in advance Best regards

3 Replies

AD Administrator Syncfusion Team October 6, 2005 09:58 AM UTC

If you have only one selectable row, I do not understand what you mean by "to navigate programatically between the rows in a GGC". Only selectable rows can be navigated to, so you can only make that one selectable row current.


JE Jose Egea October 6, 2005 11:58 AM UTC

Sorry for my bad explanation. I only want to navigate in my groupinggrid using buttons when its grouped. It''s very simple when it''s not grouped, but I don`t know how to do something similar when it''s grouped. Here I have attached the way I navigate programmatically when it is not grouped. WindowsApplication2_8869.zip


AD Administrator Syncfusion Team October 6, 2005 04:35 PM UTC

Try using the SetCurrent method on the records in teh FilteredRecords collection. private void firstButton_Click(object sender, System.EventArgs e) { this.parteCampoGridGroupingControl.Table.FilteredRecords[0].SetCurrent(); } private void lastButton_Click(object sender, System.EventArgs e) { this.parteCampoGridGroupingControl.Table.FilteredRecords[this.parteCampoGridGroupingControl.Table.FilteredRecords.Count-1].SetCurrent(); } private void nextButton_Click(object sender, System.EventArgs e) { int i = this.parteCampoGridGroupingControl.Table.FilteredRecords.IndexOf(this.parteCampoGridGroupingControl.Table.CurrentRecord); if(i < this.parteCampoGridGroupingControl.Table.FilteredRecords.Count - 1) this.parteCampoGridGroupingControl.Table.FilteredRecords[i+1].SetCurrent(); } private void previosButton_Click(object sender, System.EventArgs e) { int i = this.parteCampoGridGroupingControl.Table.FilteredRecords.IndexOf(this.parteCampoGridGroupingControl.Table.CurrentRecord); if(i > 0) this.parteCampoGridGroupingControl.Table.FilteredRecords[i-1].SetCurrent(); }

Loader.
Up arrow icon