Auto-Size Rows to fit their data in Wijmo flex grid

Posted by: rajesh.sakhamuri on 22 October 2019, 3:24 am EST

    • Post Options:
    • Link

    Posted 22 October 2019, 3:24 am EST

    Hi,

    How we can do Auto size rows, if the cell have more data in Angular.

    I have tried to add [autoRowHeights]=“true”/autoSizeRows=“true” in html file i am getting the console error like: “Can’t bind to ‘autoSizeRows’ since it isn’t a known property of 'wj-flex-grid”.

    Can you please give the suggestion on this issue.

    Thanks in Advance.

  • Posted 22 October 2019, 11:43 pm EST

    Hi Rajesh,

    The reason behind the issue is that autoSizeRows is not an input for wj-flex-grid but rather it is a method. You only need to use the autoRowHeights property for adjusting the heights. Refer to the sample link below:

    https://stackblitz.com/edit/angular-tx9b2i

    But, this property was added in the 19v2 version. If you are using an older version of wijmo, then you will need to call the autoSizeRows method of FlexGrid in the ngAfterViewInit callback:

    ngAfterViewInit() {
     	this.grid.autoSizeRows();
     }
    

    Regards,

    Ashwin

  • Posted 5 November 2019, 11:37 pm EST

    Hi Ashwin,

    I’m using Wijmo Version (5.20192.631)

    Can you give me a sample of autoRowHeights in AngularJs?

    I can not find auto-row-heights attribute in the link below

    https://www.grapecity.com/wijmo/api/classes/wijmo_angular_grid.wjflexgrid.html

    Thank you.

  • Posted 6 November 2019, 12:48 am EST

    Hi Nguyen,

    Please refer to the sample in angularjs:

    https://jsfiddle.net/zc9L5wmj/9/

    ~regards

  • Posted 6 November 2019, 4:15 am EST

    Thank you for your answer!

Need extra support?

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

Learn More

Forum Channels