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
3806
active cell/record click event handler
posted

I have readonly XamDatagrid (Field.Settings.AllowEdit = false;).
When I click the Cell/Record, I receive the event  - RecordActivated and RecordActivating.
But any of the above events are not raised when the record it is already active. Can you tell me which event I should listen for which is raised on clicking the active record.

 regards,
Gajender

Parents
No Data
Reply
  • 6867
    posted

     Hi,

    You can use code like this to find out which record the mouse is over when a mouse button is clicked.

    void xamDG_PreviewMouseDown(object sender, MouseButtonEventArgs e)
    {
        DependencyObject depObj = e.OriginalSource as DependencyObject;
       
        DataRecordPresenter drp =
            Infragistics.Windows.Utilities.GetAncestorFromType(
            depObj,
            typeof(DataRecordPresenter),
            true,
            this.xamDG)
            as DataRecordPresenter;

        if (drp == null)
            return;

        Debug.WriteLine("Mouse down over DataRecordPresenter. " + drp.Record);
    }

    Josh

Children
No Data