Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
128728 | Feb 8,2017 08:19 AM UTC | Feb 11,2017 04:06 AM UTC | UWP | 3 |
![]() |
Tags: SfDataGrid |
private void Button_Click(object sender, RoutedEventArgs e)
{
List<int> rowIndex = new List<int>();
List<GridCellInfo> listOfCells = new List<GridCellInfo>();
var cells = this.sfGrid.GetSelectedCells();
//Get the row index based on the selected cells and sorted it
foreach(var item in cells)
{
var rindex = this.sfGrid.ResolveToRowIndex((item as GridCellInfo).RowData);
rowIndex.Add(rindex);
}
rowIndex.Sort();
//Get the Selected cells based on the sorted row index
for (int j=0;j<rowIndex.Count;j++)
{
foreach (var item in cells)
{
var rindex = this.sfGrid.ResolveToRowIndex((item as GridCellInfo).RowData);
if (rindex == rowIndex[j])
listOfCells.Add(item);
}
}
} |
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.
or the page will be automatically redirected to sign-in page in 10 seconds.