How to auto resize column button in wijmo

Posted by: tvhau.dev on 26 November 2021, 2:36 am EST

  • Posted 26 November 2021, 2:36 am EST - Updated 3 October 2022, 12:14 pm EST

    Hi,

    I am using wijimo version 5.20192.631 and angularjs

    Sample: https://jsfiddle.net/tvhaudev/5dc0qt18/63/

    When adding a button column like the sample in the link above.

    There is a situation where the button column is not showing enough like the blue frame below

    Is there any way to set autoSizeColumn so that the button column is fully displayed like the red frame of the image below?

    Note: The button name can be long or short.

    please help.

  • Posted 29 November 2021, 6:05 am EST

    Hello,

    You may use the autoSizeColumn method of FlexGrid and pass the index of the column with header “Button”. Please refer to the code snippet and sample link for reference:

    
     let btnColumnIndex = grid.getColumn('Button')
    
          grid.columns.forEach((col)=>{
            if(col.header == 'Button'){
    	   btnColumnIndex = col.index
            }
          })
          grid.autoSizeColumn(btnColumnIndex)
    
    

    Sample link: https://jsfiddle.net/tepL4bkw/2/

    Regards

  • Posted 1 December 2021, 10:25 am EST

    I will try using that.

    Thank you!

Need extra support?

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

Learn More

Forum Channels