jQuery UI Widgets Forums Grid fit column width

This topic contains 3 replies, has 2 voices, and was last updated by  Dimitar 11 years ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • fit column width #23046

    Mhanna AbuTareef
    Participant

    Hi,

    Is it possible to initialize the columns width to column’s title/content width?

    Regards,

    Mhanna

    fit column width #23066

    Dimitar
    Participant

    Hello Mhanna,

    Yes, it is possible. Just call the method autoresizecolumns immediately after the initialization. Here is an extract from the documentation on the method:

    autoresizecolumns Method
    (requires jqxgrid.columnsresize.js)

    Auto-resizes all columns.

    Optional parameter:
    ‘all’ – resize columns to fit to cells and column header. This is the default option.
    ‘cells’ – resize columns to fit to the cells text.
    ‘column’ – resize columns to fit to the columns text.
    Code example

    Invoke the autoresizecolumns method.
    $(‘#jqxGrid’).jqxGrid(‘autoresizecolumns’);

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

    fit column width #23086

    Mhanna AbuTareef
    Participant

    Thanks!

    But in my code i’m using a custom render function for styling a specific cell(s). The rendering is working good till i begin using the above method – ‘autoresizecolumns’.
    It’s because in the inner code of this method (‘autoresizecolumns’) you are invoking the cellsrenderer (line 73 in jqxgrid.columnresize.js) function with wrong arguments number!!! regarding to the documentation of the cellsrenderer function, it expects 5 arguments, but actually you send only 3 parameters.. why?

    Regards,

    Mhanna

    fit column width #23149

    Dimitar
    Participant

    Hi Mhanna,

    Thank you for your feedback. The reported issue will be fixed in the next version of jQWidgets.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.