I'm playing around with the XamDataGrid and I've attached event handlers to the SelectedItemsChanged and RecordActivated events.
I've found that in some cases, just by clicking around and selecting rows at random I'm able raise the RecordActivated event, but not the SelectedItemsChanged event.
I'm using Infragistics3.Wpf.DataPresenter.v8.2 for my experimentation.
Is this the expected behaviour?
Activation and selection are not the same thing. RecordActivated tells you when a record was activated. When a record is active it is the focused item but the active record does not have to be selected. This is similar to how you can use the listview (e.g. in Windows Explorer) select one record but then navigate to another record without changing the selection (e.g. hold down ctrl and use the arrow keys) or you can deselect a record (or similarly a listview item) by holding the ctrl key when clicking on it.
Just tried that, but it doesn't work as I expect. I'm still sometimes missing SelectedItemsChanged events. I'm able to produce the result I want only if I attach event handlers to both SelectedItemsChanged and RecordActivated events. The RecordActivated event always tells me when a new record was selected and fortunately so far it is followed by a SelectedItemsChanged event when multiple items are selected. Since I'm just enabling/disabling actions on the number of selected items I'm happy to consume both events as long as the SelectedItemsChanged event is always fired after the RecordActivated event.
Hello,
Yes, this is normal, because of the CellClickAction property. You can change what you want to happen when the cell is clicked :
<igDP:XamDataGrid.FieldSettings> <igDP:FieldSettings CellClickAction="SelectRecord"> </igDP:XamDataGrid.FieldSettings>
Hope this helps,
Alex.