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. Image for the cookie policy date
close icon

help with the selection in the ggc

hi all.
from reading the forum, i understood that there is a difrence between 2 methods of selection in the ggc.
can you please give a simple examlpe that shows what events is being fired when using the 2 methods, and after the event is fired, how can i get information about the selected row, and columns.
also, please let me know what code do i have to write to switch between the methods.

1 Reply

AD Administrator Syncfusion Team February 13, 2007 12:32 AM UTC

Hi,

The two methods of selections in ggc are selection based on behavior inherited from GridControlBase and based on selection architecture of ggc itself.

>>>>>>>>>>>>>>>>

What events is being fired when using the two methods?

Events that will be fired in first method are:
GridGroupingControl.TableControl.Model.SelectionChanging
GridGroupingControl.TableControl.Model.SelectionChanged

Events that will be fired in second method are:
GridGroupingControl.SelectedRecordsChanging
GridGroupingControl.SelectedRecordsChanged
>>>>>>>>>>>>>>>>

How can i get information about the selected row?

In method1:
this.gridGroupingControl1.TableControl.Model.Selections.Ranges[0].Top;

In method2:
this.gridGroupingControl1.Table.SelectedRecords[0].Record.GetSourceIndex();
>>>>>>>>>>>>>>>>

What code do i have to write to switch between the methods?

To activate the second method, set the TableOptions.AllowSelection property to GridSelectionFlags.None and to activate the first method set the

TableOptions.AllowSelection property to other than none.
>>>>>>>>>>>>>>>>

Above stated solutions are implemented in the following sample.
SelectionInGGC.zip

Regards,
Saravanan

Loader.
Live Chat Icon For mobile
Up arrow icon