jQWidgets Forums

jQuery UI Widgets Forums Grid Column widths

Tagged: 

This topic contains 8 replies, has 2 voices, and was last updated by  Nicolai 11 years, 11 months ago.

Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
  • Column widths #24478

    Nicolai
    Member

    Hi,
    I’m not really sure I understand how column width works.
    How do I make it fit the content of the cell?
    If I leave at auto (default), cells/columns seems to be both much larger and much smaller than their content.

    Column widths #24481

    Mariya
    Participant

    Hi Nicolai,

    When you do not set the width property, the column would fill the remaining space. For setting the width, you can use number, percentage or pixels to set the property. You can also use the “autoresizecolumns” method in order to automatically resize the Grid columns to fit to the cells and headers text. http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/autoresizecolumns.htm?web

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

    Column widths #24483

    Nicolai
    Member

    I have some issues with this, perhaps it is due to another error I seem to get.
    If I set columnresize to true, I get the following error:

    Error: jqxGrid: Missing references to the following module(s): jqxgrid.columnsresize.js [http://localhost:53094/jqwidgets/jqxgrid.js:7]

    However, in my page, I have the resize script 🙁

    <script src="/jqwidgets/jqxgrid.columnsresize.js"></script>
    Column widths #24486

    Nicolai
    Member

    Any ideas on my columnresize issues?

    Column widths #24488

    Mariya
    Participant

    Hi Nicolai,

    When did you add the Script – before or after jqxgrid.js ?

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

    Column widths #24489

    Nicolai
    Member

    I added it before.
    And in the end, I add my own gridview script, which is bascially all the functions to get data, initialize and so on.

    Column widths #24490

    Nicolai
    Member

    I have actually added ALL scripts from the jqwidgets folder, to my page 🙂

    Column widths #24491

    Mariya
    Participant

    Hi Nicolai,

    You should add it after jqxgrid.js because jqxgrid.columnsresize.js is a Module which Extends jqxgrid.js so if you add it before, there would be nothing to be extended.

    Best Wishes,
    Mariya

    jQWidgets Team
    http://www.jqwidgets.com

    Column widths #24493

    Nicolai
    Member

    Ah of course, makes sense.

    Thank you! Everything is working now.

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

You must be logged in to reply to this topic.