views:

185

answers:

3

Hi there,

I'm using the devExpress QuantumGrid, and I'm wondering that there is no onRowChange event. How can I determine when the selected row has changed?

I could use the onCellClick event, but this isn't fired when the user scrolls with the cursor keys - It doesn't seem very suitable for that purpose.

Any ideas? Thanks a lot!

A: 

You can use the Dataset's event AfterScroll. It is fired when the current row of the dataset changes.

Eduardo Mauro
Hi, I allready tried this, but AfterScroll is also fired when the row hasn't changed (for example when data is loaded)...
gonzales
You can work around that. When data is loaded the cxGrid disables the controls, so you can do: if MyDataSet.ControlsDisabled = False then DoWhatYouWant
RichardS
+3  A: 

The TcxGridTableView class owns the OnSelectionChanged event.

From the online help:

Keep in mind the difference between selected and focused records. There can be only one focused record within a View at any time. If the View.OptionsSelection.MultiSelect option is deactivated, then the focused record is the selected record. In this case, the OnSelectionChanged event is not raised. You need to handle the OnFocusedRecordChanged event instead.

splash
Yes, I know - I tried this but onSelectionChange does not fire when I select another row.
gonzales
@gonzales, did you read the online help?
splash
A: 

OnFocusedRecordChanged from the view

Edelcom