Automatic row expanding disable

2 posts, 1 answers
  1. Student
    Student avatar
    3 posts
    Member since:
    Feb 2013

    Posted 25 Feb 2013 Link to this post

    Hi there,

    I really enjoy your OLAP support for Pivot Grid. Only one thing worries me is that my ROWS are expanded automatically. I found that it is very inconviniet if you are working with large number of rows.  How can I disable automatic expanding? Also, please find a picture in attachment. Thanks!

    AdomdConnectionSettings connectionSettings = new AdomdConnectionSettings();
    connectionSettings.Cube = "Operation";
    connectionSettings.Database = "Contoso_Retail";
    connectionSettings.ConnectionString = @"Provider=MSOLAP;Data Source=server;Initial Catalog=Contoso_Retail;";
     
    AdomdGroupDescription rowGroupDescription1 = new AdomdGroupDescription();
    rowGroupDescription1.MemberName = "[Date].[Calendar YQMD]";
     
    AdomdGroupDescription columnGropuDescription1 = new AdomdGroupDescription();
    columnGropuDescription1.MemberName = "[Geography].[Geography Hierarchy]";
    AdomdAggregateDescription aggregateDescription1 = new AdomdAggregateDescription();
    aggregateDescription1.MemberName = "[Measures].[Sales Amount]";
     
     
    AdomdDataProvider adomdDataProvider = new AdomdDataProvider();
    adomdDataProvider.ConnectionSettings = connectionSettings;
     
    adomdDataProvider.BeginInit();
    adomdDataProvider.RowGroupDescriptions.Add(rowGroupDescription1);
    adomdDataProvider.ColumnGroupDescriptions.Add(columnGropuDescription1);
    adomdDataProvider.AggregateDescriptions.Add(aggregateDescription1);
    adomdDataProvider.EndInit();
     
    this.radPivotGrid.DataProvider = adomdDataProvider;
    this.radPivotFieldList.DataProvider = adomdDataProvider;

    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="2*"/>
            <ColumnDefinition Width="*"/>
        </Grid.ColumnDefinitions>
        <pivot:RadPivotGrid x:Name="radPivotGrid"/>
        <pivot:RadPivotFieldList x:Name="radPivotFieldList" Grid.Column="1"/>
    </Grid>


  2. Answer
    Rosen Vladimirov
    Admin
    Rosen Vladimirov avatar
    640 posts

    Posted 26 Feb 2013 Link to this post

    Hi,

    Currently there's no easy way to achieve this, but I'm sending you a workaround that you can use. In the attached example we are using DispatcherTimer and StatusChanged event of AdomdDataProvider. The only thing that you'll have to adjust is the interval of the timer. In the attached project it is 30ms, but you can change it according to your needs (increase it if you have a lot of items or decrease it if your amount of data is not so huge).

    Hopefully the attachment helps. Feel free to contact us if you have any problems or concerns.

    Kind regards,
    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

  3. UI for WPF is Visual Studio 2017 Ready
Back to Top