We're trying to figure out which column was selected when the user right clicks.
We tried the following:
private void _xamDataGrid_MouseRightButtonDown(object sender, MouseButtonEventArgs e) { DataRecordPresenter rec = Infragistics.Windows.Utilities.GetAncestorFromType(e.OriginalSource as DependencyObject, typeof(DataRecordPresenter), false) as DataRecordPresenter; if (rec != null) { if(rec.Record.RecordType.ToString() == "HeaderRecord") {
// get name of column...
} } }
But can't seem to get the column name. Can you help please?
Thanks,
Jon
Hello Jon,
I am just checking if you require any further assistance on the matter.