|119125||May 13,2015 04:20 AM UTC||May 14,2015 04:12 AM UTC||WPF||1|
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:
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:
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.
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:
Please let us know if this solution helps you.
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.
This page will automatically be redirected to the sign-in page in 10 seconds.