Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
295
Right click on header to select column
posted

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
 
Parents
No Data
Reply Children
No Data