Hello,how I get from the selected row from all columns the value?
private void CellClicked(object sender, PivotCellClickedEventArgs e) { this.xamPivotGrid.SelectionSettings.SelectedCells.Clear(); this.xamPivotGrid.SelectionSettings.SelectedRows.Add(e.Cell.DataRow);
foreach (PivotCell pivotCell in e.Cell.DataRow.Cells) { //Console.WriteLine("--- cellValue: {0}", pivotCell.Data????????????? } }
for example select row 1:
--- cellValue: 221 from RecordNO--- cellValue: from 34--- cellValue: from 12--- cellValue: 0,45 from 24--- cellValue: from 63
Thanks.
Alexander
Hello,
Here is a snippet of how you can get the items that form the result in particular cell:
FlatDataSource flatDataSource = (FlatDataSource)this.flatPivotGrid.DataSource;
List<int> itemsIndexes = flatDataSource.GetCellItemsIndexes(cell);
foreach (int itemIndex in itemsIndexes)
{
[YourItemsType] item = ([YourItemsType])flatDataSource.GetRecord(itemIndex);
}
Todor
Regards,