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
2385
How can I forbid selecting whole record when I click blank area
posted

I found when I click blank area at the end of record. It will select whole record. Can I forbid this?

  • 138253
    Offline posted

    Hello,

     

    It has been a while since you have made your post, in case you still need support I will be glad to assist you further. I suppose the other community members can benefit from this answer as well. I have been looking through your post and I suggest you use the following code in your XamDataGrid’s RecordActivating event:

     

    DataRecordPresenter drp =  DataRecordPresenter.FromRecord(e.Record) as DataRecordPresenter;
    ContentPresenter cp = Utilities.GetDescendantFromName(drp, "PART_RecordContentSite") as ContentPresenter;
    if (!cp.IsMouseOver)
    {
        e.Cancel = true;
    }
    

     

    Feel free to write me if you have further questions.