I have created a behaviour that selects a record programatically when you right click on a row by setting the ActiveRecord property on the XamDataGrid. In another behaviour I listen on the SelectedItemsChanged event, however this event doesn't get raised when setting the ActiveRecord property. Is there any way I can set a record programmatically and have it raise an event on the grid that I can listen to?
Hello,
I am just checking your progress on the issue.
If you require any further assistance please do not hesitate to ask.
Sincerely,
Ekaterina
Developer Support Engineer
Infragistics
www.infragistics.com/support
Hello Russell,
I have been investigating into you issue and setting the ActiveRecord property programmatically will fire the RecordActivated event. Handling this event, will let you easily get the ActiveRecord via the given
RecordActivatedEventArgs.
For example in the following sample when the user clicks a button, the first record becomes the active one. After that the record is being hidden:
private void btnSelectActvRcrd_Click(object sender, RoutedEventArgs e)
{
xamDataGrid1.ActiveRecord = xamDataGrid1.Records.First();
}
private void xamDataGrid1_RecordActivated(object sender, RecordActivatedEventArgs e)
e.Record.Visibility = System.Windows.Visibility.Hidden;
If you have any other concerns on that matter, please do not hesitate to contact us.
Infragistics Inc.