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.
Syncfusion Feedback

Get the highlighted cells information

Thread ID:





117375 Oct 7,2014 11:58 PM Oct 10,2014 05:28 AM WPF 3
Tags: SfDataGrid
Chong Yee Mei
Asked On October 7, 2014 11:58 PM


We currently building a sfdatagrid control and would like to get the highlighted/ selected cells information. 
Now only able to get the last highlighted/selected cell information with the code below:
var cellInfos = SFDataGrid.SelectionController.CurrentCellManager.CurrentCell;

Any way to get the all highlighted cells information for example row and column index to retrieve the real data of the all highlighted cells?

Please advise, thanks.

Farjana Parveen Ayubb [Syncfusion]
Replied On October 9, 2014 08:11 AM

Hi Chong,


Thank you for contacting Syncfusion Support.


We have analyzed your query. You can achieve your requirement by using GetSelectedCells() method in SfDataGrid. By using this method you can get the whole selected cell information.


Please refer the below code snippet and sample in the following location:


Code Snippet:


  private void Button_Click(object sender, RoutedEventArgs e)


           int rowindex =0;

           var selectedcels = this.sfdatagrid.GetSelectedCells();

           int count = selectedcels.Count;

           for (int i = 0; i < count; i++)


               rowindex = this.sfdatagrid.ResolveToRowIndex(selectedcels[i].RowData);

               var colindex = this.sfdatagrid.Columns.IndexOf(selectedcels[i].Column);

               var visibilecolindex = this.sfdatagrid.ResolveToGridVisibleColumnIndex(colindex);





Farjana Parveen A


Attachment: SfDataGridSelectedItems_cf40aebd.zip

Chong Yee Mei
Replied On October 9, 2014 10:13 PM

The solution is useful, but now have another problems.
By using the sample when I select two items of CustomerBranch and two items of SalesId,
then the other unselected items of CustomerBranch gone.
Any way to solve it?
Please advise, thanks

Attachment: filterSelected_3b958241.zip

Farjana Parveen Ayubb [Syncfusion]
Replied On October 10, 2014 05:28 AM

Hi Chong,


Sorry about the inconvenience caused.


We have analyzed your query. Normally the filter pop up shows both checked and unchecked data on last filtered column where the filter has been applied and the remaining column shows only the visible data as checked state in filter pop up. It’s a behavior of filter in SfDataGrid.



Farjana Parveen A  


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.

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