jQWidgets Forums

jQuery UI Widgets Forums Grid Error when I call setcolumnproperty on a grid in a jqxwindow

This topic contains 1 reply, has 2 voices, and was last updated by  Martin 6 years, 3 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • fabriceb
    Participant

    Hello,

    I want to change column’s header on my grids.
    I use :
    $(‘#jqxgrid’).jqxGrid(‘setcolumnproperty’, ‘firstname’, ‘text’, ‘foo’);

    It works perfectly on a main window.
    But if the grid is in à jqxwindow, I qet this error message :
    Cannot read property ‘length’ of undefined

    ==> the columns header is changed, but the error stops the javascript. So If I want to change 2 columns headers, only the first one is changed.

    Here is an example :
    http://jsfiddle.net/mogador/s83n29ur/
    I create 2 grids : one in the main window, one in a jqxwindow.
    Clic on button [change columns header in main window] ==> both headers are changed in the first grid.
    Clic on button [change columns header in dialog window] ==> it’s exactly the same code, I just open the window first and then I call setcolumnproperty.
    ==> the first header is changed, then You get an error in the console, and the 2nd header is not changed.

    I’m stuck for the while, please help !!


    Martin
    Participant

    Hello fabriceb,

    You can fix this by invoking the setcolumnproperty methods in a timeout after opening the window.
    I have updated your Example.

    Best Regards,
    Martin

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

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

You must be logged in to reply to this topic.