Hi
I have a igPivotGrid and igPivotDataSelector. It look like https://gyazo.com/d0704b99c6ba6fd68d0fd8b2d3f8fa77
I want implement transpose column to row, row to column and keep status expanded when click button transpose.
https://gyazo.com/742e7b5a1b9f1a874c630f1e9bf63269
Can you help me ?
Hello Bui,
Thank you for posting in our forum.
You can transpose columns and rows as follows.
1. Transpose columns and rows in existing igOlapFlatDataSource option.2. Create new igOlapFlatDataSource with the option.3. Update igPivotView dataSource to new igOlapFlatDataSource.
// When initializing var option = { ・・・ rows: "[Date].[Dates]", columns: "[Seller].[Seller]", ・・・ }; var ofds = new $.ig.OlapFlatDataSource(option); $("#pivotView").igPivotView({ dataSource: ofds, ・・・ });
// When transposing var rows = option.rows; var columns = option.columns; option.rows = columns; option.columns = rows; var ofds = new $.ig.OlapFlatDataSource(option); $('#pivotView').igPivotView('option', 'dataSource', ofds);
About keeping expanded, there is no option or functionality to persist it.So you should expand columns and rows manually calling expandTupleMember method.
https://jp.igniteui.com/help/api/2016.2/ui.igPivotGrid#methods:expandTupleMember
I hope this will help.If you need further assistance, please let me know.
Best Regards,Tatsushi KiryuDeveloper support EngineerInfragistics