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
Is there a record or cell click event
posted

is there any event which is raised when mouse is click on a record or cell? I am familiar with record activating/activated event, but it does not solve my purpose. I am looking for a mouse event.

I used PreviewMouseDown event as below, but does not help when I mouse click on deactive records.

protected internal virtual void LookupGrid_PreviewMouseDown(object sender, MouseButtonEventArgs e)
        {
                   DependencyObject source = e.OriginalSource as DependencyObject;
                    if (source == null) return;

                    DataRecordPresenter drp = Infragistics.Windows.Utilities.GetAncestorFromType(source,typeof(DataRecordPresenter), true, this.LookupDataGrid) as DataRecordPresenter;
                   
                    if (drp != null)
                    {
                          //--drp is not NULL when clicked any where in xmlDataGrid
                         if(drp.IsActive)
                         {
                               // - when clicked on the active record but not on other records
                        }
                     }
 }

Parents
  • 69686
    Suggested Answer
    posted

    When you click on the DataRecordPresenter, couple of events will fire - RecordActiveting/ed and SelectedItemChanging/ed. If you want to be able to select the Record right away with click, you can set the CellClickAction to SelectRecord.

    Please give us more information on what you are trying to achieve and why this PreviewMouseLeftButtonDown event is not working for you?

    Thanks

Reply Children