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


Thread ID:





119125 May 13,2015 04:20 AM UTC May 14,2015 04:12 AM UTC WPF 1
Tags: SfDataGrid
Asked On May 13, 2015 04:20 AM UTC

Hi ,

Good Day .

How to get 'IsSynchronizedWithCurrentItem' in SfDataGrid ?

Thank you .


Elavarasan M [Syncfusion]
Replied On May 14, 2015 04:12 AM UTC

Hi yapwen,

Thank you for using Syncfusion products.

We analysed your query and currently we don’t have direct support for IsSynchronizedWithCurrentItem in SfDataGrid. You can achieve your requirement (to use IsSynchronizedCurrentItem) in sample level. We have prepared a sample by using IsSynchronizedCurrentItem in SfDataGrid. Please find the sample from the following location:
Sample: http://www.syncfusion.com/downloads/support/forum/119125/SfDataGridSample63424717.zip

In the above sample, we have loaded SfDataGrid and ComboBox with same itemssource. By using current changed event in view of the datagrid, selected item of a grid will be reflected in combobox. For this, you need to change the current item of the collection (which is bound to the SfDataGrid and ComboBox) by using MoveCurrentTo method in Collectionview as shown in the following code snippet:

Code Snippet:

this.datagrid.View.CurrentChanged += View_CurrentChanged;

void View_CurrentChanged(object sender, EventArgs e)


//while selecting item in a grid, setting current item of collection (which is bound to the SfDataGrid and ComboBox) as current item of sfdatagrid.



While selecting an item in combobox, it will be reflected in datagrid with the help of currentchanged event of the collection (which is bound to the datagrid and ComboBox) and current item of datagrid is set as the current item of the collection in the event as shown in the following code snippet:
Code snippet:

CollectionViewSource.GetDefaultView(this.datagrid.View.SourceCollection).CurrentChanged += MainWindow_CurrentChanged;

void MainWindow_CurrentChanged(object sender, EventArgs e)


//while selecting item in combobox, setting current item of sfdatagrid from the current item of collection.

if ((sender as ListCollectionView).CurrentItem != datagrid.CurrentItem)

datagrid.CurrentItem = (sender as ListCollectionView).CurrentItem;


Please refer the below UG link to know about CurrentItem in Sfdatagrid:

UG Link: http://help.syncfusion.com/ug/wpf/index.html#!Documents/selection1.htm

Please let us know if this solution helps you.
Elavarasan M


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