This is a migrated thread and some comments may be shown as answers.

Automatic row expanding disable

1 Answer 119 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Student
Top achievements
Rank 1
Student asked on 25 Feb 2013, 07:05 PM
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>


1 Answer, 1 is accepted

Sort by
0
Accepted
Rosen Vladimirov
Telerik team
answered on 26 Feb 2013, 07:19 AM
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.

Tags
PivotGrid
Asked by
Student
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or