Need a special offer?Find out if your project fits.
+

Too many columns for classic form,Switched layout to compact form

Answered
Santhosh asked on August 23, 2021

Hi,

Required clarification to unfrozen the frozen rows, our customer requirement is 25 rows with 4-5 values, While creating the template flexmonster automatically converted to compact instead of classic. Kindly suggest

5 answers

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster August 24, 2021

Hello,
 
Thank you for posting on our forum.
 
Please note that switching to the compact form is required to free up space for scrollable content (actual aggregated values) on your grid. Otherwise, the entire grid would be taken by headers.
 
See the following forum thread for a detailed explanation of this behavior and possible solutions: Too many columns for classic form. Switched layout to compact form. However, please note that placing 25 fields in rows is likely to exceed a limit for any reasonable grid dimensions.
 
Kind regards,
Illia

Public
Santhosh August 25, 2021

Thanks for the reply,
checked the mentioned link, while exporting instantly changed from classic to compact because more than lakh data.
 
Code : 

function exportClassicForm() {
let container = document.querySelector("#pivotContainer");
let initialWidth = container.getBoundingClientRect().width;
container.style.width = ((pivot.gridColumnCount() - 1) * 110 + pivot.getRows().length * 110) + "px";
pivot.setOptions({
grid: {
type: "classic"
}
});
pivot.refresh();
}

By using this code the compact change to classic but it again instanly change to campact automatically. If any other way to change compact to classic.
any possibility to enables a scroll bar for the frozen areas also.

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster August 25, 2021

Hello,
 
Please note that the mentioned code sample only allows exporting the grid in the classic form to Excel. When the export is complete, the form is switched back to compact. This is the expected behavior of this sample since the initial request was only to export in classic form, not to display the grid.
 
The scroll cannot be enabled for frozen areas.
 
Kind regards,
Illia

Public
Santhosh August 25, 2021

Hi,
 
In the above code sample,  it changes the compact grid to a "classic" grid and export that data.
We implemented your code (what you attached in form of a link),
it exports the 1st line only to "classic" form,
after that rest of the lines doesn't changes (rest of the line are still in "compact" format)
Because we have 1lacs records,
while clicking "export", the grid change to classic and triggers export loader,
meanwhile, the grid automatically changes back to "compact" (without using exportcomplete function in the sample).

so we got an unexpected file.
 
The above sample code works fine and gives the expected output in https://jsfiddle.net/k1f8ymru/
 
but while implementing the above sample code in our project we are facing this problem.
 

Public
Illia Yatsyshyn Illia Yatsyshyn Flexmonster August 27, 2021

Hello,
 
This behavior may be due to the unusual sizing of columns of your grid. The mentioned example uses a constant value (110 px) and calculates the grid's width required to display classic form without switching. 
If columns' dimensions differ in your reports, modify the code to match your case.
 
Regards,
Illia

Please login or Register to Submit Answer