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
3914
Cannot expand rows - exception... Bug ??
posted

Hi,

I get the following exception when I expand rows by calling the below mentioned function after I set the DataSource to the PivotGrid. Looks like some internal bug in PivotGrid.

 

Message: Object reference not set to an instance of an object.

Source: InfragisticsWPF4.Olap.v11.1

Stack Trace: at Infragistics.Olap.DataSourceBase.SwitchAxisMember(IMember axisMember)
   at Infragistics.Olap.FlatData.FlatDataSource.SwitchAxisMember(IMember axisMember)
   at Infragistics.Controls.Grids.PivotHeaderCell.set_IsExpanded(Boolean value)
   at MarketManipulatorControl.GridView.ExpandPivotGridColumns()

 

 

private void ExpandPivotGridColumns()
        {
            try
            {
                // Expand Column Hierarchy
                foreach (PivotColumnHeaderCell cell in pivotGrid.GridLayout.ColumnHeaderCells)
                {
                    if (cell.IsToggleVisible && cell.IsExpanded == false)
                    {
                        cell.IsExpanded = true;
                        return;
                    }
                }
                // Expand Row Hierarchy
                foreach (PivotRowHeaderCell cell in pivotGrid.GridLayout.RowHeaderCells)
                {
                    if (cell.IsToggleVisible && cell.IsExpanded == false)
                    {
                        cell.IsExpanded = true;
                        return;
                    }
                }
            }
            catch (Exception e)
            {
            }
        }

 

 

Is there any workaround for this?

 

Thanks

Sangeetha

 

Parents Reply Children
No Data