We have updated Flexmonster Software License Agreement, effective as of September 30, 2024. Learn more about what’s changed.

Slice object `expands` property not being respected by grid

Answered
Michael asked on September 14, 2017

Hello,
It appears that the expands object part of report slice objects is not being respected by the grid when it renders data.
The problem is evident in the Expand Restoration example provided by your documentation.
Furthermore, I noticed that the slice object obtained through the getReport() call seems to misleadingly set the expandAll property, which is part of the expands object. Concretely, after collapsing a few rows and columns, expandAll is set to true when I expect it to not be set at all.
The API documentation is a bit ambiguous about how the expands object behaves. I'd presume that when either a rows or columns property is set, the semantics is for those rows or columns to be collapsed (i.e. presence indicates collapse).

5 answers

Public
Ian Sadovy Ian Sadovy Flexmonster September 14, 2017

Hello Michael,
 
Thank you for reporting.
It seems that there is an issue with a capital case in the tuples. Temporary, we have changed it to the lower case - https://jsfiddle.net/flexmonster/6qr4q7sg/. Also, we will restore compatibility with all cases in the next minor release (ETA Oct 09). 
As for the issue with expandAll property, could you please provide some specific steps to reproduce? I've tried on the same jsfiddle, but everything seems working as expected.
Also, I will redirect your feedback about API documentation to our technical writer.
Does it work for you?
 
Regards,
Ian
 
 

Public
Michael September 15, 2017

Hello Ian,
Thanks for the explanation.
After noting that case discrepancy, I can't seem to reproduce the issue I mentioned about expandAll on a JSFiddle using the version of Flexmonster from your CDN. However, I've forked another JSFiddle with a separate issue for you (based off the Expand Restoration one).
https://jsfiddle.net/m9oov2oj/
To observe the problem:

  1. Save the initial slice (i.e. only Canada is expanded)
  2. Tweak the grid so the expansion state is different
  3. Apply the saved slice
  4. The grid doesn't respect displaying the initial slice
Public
Tanya Gryshko Tanya Gryshko Flexmonster September 15, 2017

Hello Michael,
Thank you for the detailed description. Currently, runQuery API call applies only rows, columns and reportFilters . To apply the whole slice please try the following approach instead of runQuery:

var report = flexmonster.getReport();
report.slice = slice;
flexmonster.setReport(report);

Please let me know if the above approach is suitable for your case.
Regards,
Tanya

Public
Michael September 18, 2017

Hello Tanya,
Thanks for the clarification—I was under the impression that runQuery applied the whole slice. Using setReport did the trick.

Public
Tanya Gryshko Tanya Gryshko Flexmonster October 18, 2017

Hello, Michael,
I am glad to inform you that the minor release 2.405 is available for download.
The issue with expands restoration from the report if the member’s unique name contains a capital letter was fixed.
You are welcome to update the component.
Regards,
Tanya

Please login or Register to Submit Answer