We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

SelectedItems of an SfDataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

130822 Jun 5,2017 12:11 PM Jun 6,2017 02:58 AM WPF 1
loading
Tags: SfDataGrid
Zeljko Lazic
Asked On June 5, 2017 12:11 PM

I have a View which contains an SfDataGrid which is set to allow mulitple row selections.
How do I bind the SelectedItems property of an SfDataGrid to my ViewModel? It doesn't appear in the list when I'm editing the XAML, only SelectedItem appears.

Muthukumar Kalyanasundaram [Syncfusion]
Replied On June 6, 2017 02:58 AM

Hi Zeljko, 

Thank you for contacting Syncfusion support. 

We have analyzed your query. In SfDataGrid.SelectedItems is a collection property, so whenever the SelectedItems collection is changed, the property bound with SelectedItems does not get notified for this change. However, you can achieve this by creating an attached property for SelectedItems. And SfDataGrid’s SelectedItems values are set to the attached property by handling SelectedItems.Collectionchanged event. For your reference, we have attached the KB link. Could you please refer to it. 


Please let us know if you have any query. 

Regards, 
Muthukumar K 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;