jQWidgets Forums

jQuery UI Widgets Forums Grid Dynamic columns in a grid based on array

Tagged: ,

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 12 years, 11 months ago.

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

  • SushmaSriram
    Member

    Hi Team,

    I have a list of attribute names in an arraylist namely “alReqAttrNames” . which needs to be considered as columns in the grid. I would like to have this grid displayed on various pages and the number of attributes differ from page to page as below.

    var reqGridColumns = new Array();
    <%for (int i=0; i
    var row = {};
    row["text"] =;
    row["datafield"] =;
    row["columntype"] = 'textbox';
    row["width"] = 100;

    reqGridColumns[] = row;

    And finally setting the grid columns. but page turns to blank when i try to do this way.

    Hence could you please help me.

    Thanks in advance,
    Sushma


    Peter Stoev
    Keymaster

    Hi SushmaSriram,

    There are a few syntax issues in the posted code. You can try to define the ‘text’ and ‘datafield’ by doing the following:

    row["text"] = '';
    row["datafield"] = '';

    Best Regards,
    Peter Stoev

    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.