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.
Unfortunately, activation email could not send to your email. Please try again.

help with the selection in the ggc

Thread ID:

Created:

Updated:

Platform:

Replies:

56192 Feb 10,2007 06:10 AM Feb 12,2007 07:32 PM Windows Forms 1
loading
Tags: GridControl
Shachar Shimshon
Asked On February 10, 2007 06:10 AM

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.

Administrator [Syncfusion]
Replied On February 12, 2007 07:32 PM

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

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;