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
760
How to change the Rows or Columns property
posted

Hi,

DataSourceBase.GenerateInitialItems is used to set intial values on Cube, Measures, Rows, and Columns properties.

I would like to subsequently change the Rows or Column property to a new value via code. However, when I assign the property a second time using GenerateInitialItems it appears to have no effect.

Thanks,

Gary

Parents
  • 17559
    posted

    Hello Gary,

     

    I have been looking into your issue and I can suggest you add the new dimensions directly in the DataSource Columns collection  instead of using the method GenerateInitialItems:

         var DataSource = this.xamPivotGrid.DataSource;

         IHierarchy hierarchy = DataSource.Cube.Dimensions["Customer"].Hierarchies[0];

         IFilterViewModel filterViewModel =   DataSource.CreateFilterViewModel(hierarchy);

         DataSource.Columns.Clear();

         DataSource.Columns.Add(filterViewModel);

     

    For additional reference please check the section “From Code-behind During Runtime” from the following link form our documentation:

    http://help.infragistics.com/NetAdvantage/WPFDV/2011.2/CLR4.0/?page=xamPivotGrid_US_Assigning_Hierarchies_And_Measures.html

     

    Please let me know if you need any additional assistance on this matter.

Reply Children