The width of the first column in the grid needs to be minimized

Posted by: nilesh_nichal on 29 October 2024, 3:31 am EST

    • Post Options:
    • Link

    Posted 29 October 2024, 3:31 am EST - Updated 29 October 2024, 3:36 am EST

    We have integrated a Wijmo grid (wj-flex-grid) into our application, and we are looking to adjust the width of the first column, which is dynamically generated upon the grid’s creation.

    **Note ** : I have attached the screenshot for same for your reference where marked circle for the first column which by default making the fixed width when we are coming for the first time, while we can drag to increase and decrease the width, but our requirement is to make this default width to decrease by one third (1/3) so that we can utilize the space accordingly. Let me know if having issue or anything required from our end.

  • Posted 29 October 2024, 5:36 am EST

    Hi Nilesh,

    Assuming that you are using the Angular framework in your project, you can handle the initialized event of the flexgrid and set a width for the row headers column. Please refer to the following code snippet -

    
    flexInitialized(flexgrid: wjcGrid.FlexGrid) {
            flexgrid.rowHeaders.columns[0].width = 12;
        }
    


    Here’s a sample for your reference - https://jscodemine.mescius.io/share/_B3ZTstOIUKT4UoKyKxi9w/

    If needed, you can also completely hide this column by setting the ‘headersVisibility’ property of the flexgrid. Here’s the API reference for the same - https://developer.mescius.com/wijmo/api/classes/wijmo_grid.flexgrid.html#headersvisibility

    In case, you face any issues, please let us know.

    Regards

Need extra support?

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

Learn More

Forum Channels