jQWidgets Forums

jQuery UI Widgets Forums Grid jqxgrid cell width

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • jqxgrid cell width #112084

    dmesabar
    Participant

    Hi,
    Can I set the cell width after jqxgrid load?
    I would like set the cell width like this function $('#jqxGrid').jqxGrid('setcolumnindex', 'name', 3);
    For exemple: set the width of cell with 150px
    $('#jqxGrid').jqxGrid('setwidth', 'columnname', 150);
    Thanks.

    jqxgrid cell width #112091

    Hristo
    Participant

    Hello dmesabar,

    Yes, you could use the setcolumnproperty property to achieve this.
    Please, take a look at this demo:
    http://jsfiddle.net/jqwidgets/XSKXc/
    More details you could find in our API Documentation page.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

    jqxgrid cell width #112123

    dmesabar
    Participant

    Hi Hristo,
    Is it possible define min-width of column on jqxgrid?

    Can i reset the width for the first width (default or first time that was defined)?
    For example:
    My jqxgrid have about 20 columns and a few cells are editable and some cells are little.
    So, I did:
    1) Save the width of cell with getcolumnproperty when it was runcellbeginedit
    2) Set the width of cell with setcolumnproperty with a fixed width
    3) Set the width of cell with setcolumnproperty with a width saved on 1)
    Sometime this dont work perfectly and not execute the 3) step and the width was set forever …
    Can I reset the all widths of jqxgrid or do this more simplified?

    jqxgrid cell width #112131

    Hristo
    Participant

    Hello dmesabar,

    Yes, you could set the minimum width for a specific column with the minwidth member of the columns property.
    You could try to use the render method after you set the new width.
    If this does not help I would like to ask you for one small example (jseditor/jsfiddle) that represents it.
    Also, you could try the refresh method of the jqxGrid, too.

    Best Regards,
    Hristo Hristov

    jQWidgets team
    https://www.jqwidgets.com

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

You must be logged in to reply to this topic.