Auto Resizing of Row as per content in Flexsheet

Posted by: ashishbisht006 on 3 October 2018, 6:06 pm EST

    • Post Options:
    • Link

    Posted 3 October 2018, 6:06 pm EST

    Hi,

    I am looking for a way to auto resize the row height as per the content in row on load as well as when cell edit ends.

    I tried going with the solution provided in various forums, but none of them seems to be working.

    Below are the changes that I tried:

    flexSheet.selectedSheet.grid.autoSizeMode = 3;
     flexSheet.autoSizeRows(0, flexSheet.rows.length, false);
     flexSheet.autoSizeRows();
    

    and```

    flexsheet.autosizeRows(e.row)

    
    I thought of giving a large number as height for testing but there too just the cell height is increasing, text is still getting wrapped in one line[img]https://gccontent.blob.core.windows.net/forum-uploads/file-14e268ed-f7ef-477c-9fcd-5d7359334a61.png[/img]
  • Posted 4 October 2018, 6:22 pm EST

    To wrap text in a column, you need to set wordWrap property of column to true.

    // refer to the following code snippet
    let colToWrap = flexSheet.columns.getColumn('longContent');
    colToWrap.wordWrap = true;
    

    You may also refer to the following sample:

    https://stackblitz.com/edit/angular-nywmuj?file=app%2Fapp.component.ts

    ~Sharad

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels