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
2815
Right mouse click selecting single record and deselecting others
posted

How do i get right mouse click to add active record to SelectedItems collection without removing currently selected records?

This is what I currently have but records are being unselected on right mouse click:

  void OnGridMouseRightButtonDown(object sender, MouseButtonEventArgs e)

        {

            DataRecordPresenter drp = sender as DataRecordPresenter;

            if (drp != null)

            {

                if (drp.DataPresenter != null 

                    && drp.DataPresenter.SelectedItems != null 

                    && drp.DataPresenter.SelectedItems.Records != null)

                    drp.DataPresenter.SelectedItems.Records.Add(drp.Record);                                

            }

        }


 TIA.

Parents Reply Children
No Data