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.
Syncfusion Feedback

Detecting selection made / deactiveted

Thread ID:

Created:

Updated:

Platform:

Replies:

9929 Jan 16,2004 05:56 PM UTC Jan 16,2004 11:12 PM UTC WinForms 4
loading
Tags: GridControl
simon
Asked On January 16, 2004 05:56 PM UTC

I need to be able to detect when a selection is made/deselected in a gridcontrol. I am emulating list box type behavior with external actions required (enabling/disabling buttons) based on the current selection. There appears to be no event for this. I am using CellActivated right now, which is a bad way of doing this - and also there is no way to detect the selection disabled by pushing escape. ... or is there?

Administrator [Syncfusion]
Replied On January 16, 2004 08:11 PM UTC

By selection, do you mean selecting a range of cells (as in grid.Selections.Add(...))? Or do you mean making a single cell the current cell? The SelectionChanging event is the main event for catching the changing a selection. To catch making a cell current, there is a whole series of event that you can use to catch the action at different points in the process. CurrentCellMoving happens at the start, and CurrentCellMoved happens at the end. CurrentCellMovedFailed. CurrentCellRejectedChanges happens when you press esc on an editing cell.

Administrator [Syncfusion]
Replied On January 16, 2004 08:55 PM UTC

I''m talking a range of selected cells (i.e. the entries selected in my virtual ''listbox''). SelectionChanging is exactly what I want, on closer inspection SelectionChanging *is* obviously there but just not in the DataBoundGrid class. i dont understand this! am i missing something? >By selection, do you mean selecting a range of cells (as in grid.Selections.Add(...))? Or do you mean making a single cell the current cell? > >The SelectionChanging event is the main event for catching the changing a selection. > >To catch making a cell current, there is a whole series of event that you can use to catch the action at different points in the process. > >CurrentCellMoving happens at the start, and CurrentCellMoved happens at the end. CurrentCellMovedFailed. CurrentCellRejectedChanges happens when you press esc on an editing cell.

Administrator [Syncfusion]
Replied On January 16, 2004 09:05 PM UTC

The event is in GridDataBoundGrid.Model. this.gridDataBoundGrid1.Model.SelectionChanging += new GridSelectionChangeEventHandler(gridModel_SelectionChanging);

Administrator [Syncfusion]
Replied On January 16, 2004 11:12 PM UTC

great! thanks >I need to be able to detect when a selection is made/deselected in a gridcontrol. > >I am emulating list box type behavior with external actions required (enabling/disabling buttons) based on the current selection. > >There appears to be no event for this. > >I am using CellActivated right now, which is a bad way of doing this - and also there is no way to detect the selection disabled by pushing escape. > >... or is there?

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.

Warning Icon 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.Close Icon

;