Handle resize event for columns

Closed
Ravi asked on December 7, 2021

Hey, 
     I want to handle the column resize event once grid gets draw. Is there any way to capture the event?
 
Thanks and Regards
Ravi A

4 answers

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster December 8, 2021

Hello, Ravi,
 
Thank you for reaching out to us.
 
Could you please provide us with more details on how you plan to use this event? It will help us to understand your use case.
 
Looking forward to your response.
 
Kind regards,
Nadia

Public
Ravi December 9, 2021

Hi Nadia, 
 
We would like to resize the header height based on the text inside.
Default behavior: While we resize a column header if the text is larger than the column width, the text will get wrapped and added with three dots(...) at the end.
Trying to achieve: while we adjust the column width manually, we should adjust the row height based on the text presented in the column.
we are able to remove the three dots(...) with help of CSS so the text can break to the next line but we are not able to adjust the height of the row based on the text.
so we are trying the get the resize event of a resizeable column so that we can make changes on the row heights.

Public
Ravi December 9, 2021

Hi Nadia Khodakivska,
In this example, Init with API call new Flexmonster (with the Toolbar) - JSFiddle - Code Playground
while the user adjusts the width of the Price column then the height should be adjusted automatically similar to google sheet. 
we have added the style for text wrap. Our client needs the Text should be wrapped automatically when they adjust the width of the column same like google sheet. 

Public
Nadia Khodakivska Nadia Khodakivska Flexmonster December 10, 2021

Hello,
 
Thank you for the detailed explanation.
 
Due to the Flexmonster architecture, it is impossible to achieve the described behavior. The current rendering algorithm is intended to work with big grid sizes. Therefore, it requires virtual scrolling that creates some limitations to achieve the best performance. One of these limitations is supporting multi-lines on the grid. However, as a workaround, we suggest setting the height of the necessary fields to fit, for example, two rows of the text.
 
You are welcome to write to us in case further questions arise.
 
Kind regards,
Nadia 

This question is now closed