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
90
Selection strategy
posted

Hi

Is there anyway to provide the XamDataGrid with a custom Selection strategy? I would like the behaviour of the SelectionStrategyExtended, but as if the CTRL key was pressed all the time.

 The reason that I need this is that I am trying to achieve a behaviour like the one Josh Smith does with the XamDataGridWithCheckedRecords sample (http://blogs.infragistics.com/blogs/joshs/archive/2008/09/04/adding-checkboxes-to-the-record-selectors-in-xamdatagrid.aspx) but without having to resort to individual view models. So far I have been successful using the Record.IsSelected bound to the check box - except for the fact that if you just miss the check box when you click, all selections are cleared and only that single selection remains.

Does anyone have any great ideas on how to do this - I guess there is a reason Josh choose the path that he did.

Regards Lau Bakman

Parents
No Data
Reply
  • 69686
    posted

     Hello Lau,

     I am guessing you want to select a Record only by clicking on it and deselect if it is already selected. It is easy to do that with 

    SelectionTypeRecord="Extended" and RecordActivated Event set IsSelected = True. Or am I missing something.

    Alex. 

Children