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
130
Clear the Selection of grid row in XAML on certain action
posted

Hello,

I have a xamDataGrid and i want to clear the selection of the row on click of a button. I want to achieve this in XAML (may be by triggers) by binding some boolean property.

Do I need to make ActiveRecord to null and also do something like SelectedItems.Record.Clear???

Thanks,

Abdi

Parents
No Data
Reply
  • 2490
    Offline posted


    Hello Abdeali,

    One way to achieve the functionality you are looking for, is to use Command.
    If in your scenario you do not use code behind I will suggest using the button which clears the selection with Command. Assuming that you want to clear all selected records, I have created a small sample application, please find it as an attached file.

    It is also necessary to set the ActiveRecod to null, for example:

                            myXamDataGrid.SelectedItems.Records.Clear();

                           myXamDataGrid ActiveRecord = null;

     

    If you need further assistance concerning this matter, please let me know.

    XamDataGrid_UnSelect_Command.zip
Children
No Data