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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SelectedItems of an SfDataGrid

Thread ID:





130822 Jun 5,2017 04:11 PM UTC Jun 6,2017 06:58 AM UTC WPF 1
Tags: SfDataGrid
Zeljko Lazic
Asked On June 5, 2017 04:11 PM UTC

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 06:58 AM UTC

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. 

Muthukumar K 


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon