Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
765
How I get from the selected row from all columns the value?
posted

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

 

 

Parents
No Data
Reply
  • 7922
    Verified Answer
    posted

    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,

Children
No Data