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

Disable auto switch from classic to compact mode

Answered
Shripal Dalal asked on July 20, 2023

Hi,

When our grid is too wide in classic mode (lots of fields selected) it auto goes to compact mode which is highly inconvenient to the customers. In that case we have to manually widen the table with:

document.getElementById('pivotContainer').style.width = '500%';

Now the problem is the vertical scroll bar also goes on the extreme right. How can we have classic mode in normal table without it auto going to compact mode. As we just want to export to CSV and then use the same in excel.
 
Also when we expand the grid body, the freeze panes feature goes away. So when we scroll to the right we cannot see original frozen 10, 12 columns.

Please guide us for the same. Thanks.

3 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster July 21, 2023

Hello,

Thank you for reaching out to us.

To disable the feature of the automatic switch from the classic to the compact form, you can use the autoSwitchToCompact property of the options.grid object:

options: {
    grid: {
       type: "classic",
       autoSwitchToCompact: false
   }
}

You are welcome to check the following JSFiddle for reference: https://jsfiddle.net/flexmonster/L8btep0f/ 

Please let us know if it works for you. Looking forward to hearing from you.

Kind regards,
Nadia

Public
Shripal Dalal July 21, 2023

Hi,
It works, but when we start scrolling down it auto switches to compact. Especially when it's a large dataset. Could you please find a fix for this ?

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster July 21, 2023

Hello,

Thank you for the prompt response.

We could not reproduce the described behavior. Please edit the JSFiddle from our previous answer to demonstrate how it automatically switches to compact mode. It would greatly help us.

Looking forward to hearing from you.

Kind regards,
Nadia

Please login or Register to Submit Answer