jQWidgets Forums

jQuery UI Widgets Forums Grid Two column with the same value from one field

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

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

  • mirko.fisic
    Participant

    I want use the same value for two columns, here is example:

    var source ={
    datatype: “json”,
    datafields: [
    { name: ‘idn’ },
    { name: ‘ntitle’ },
    { name: ‘cdate’},
    { name: ‘pdate’},
    { name: ‘title’, type:’string’ },
    { name: ‘publish’ }
    ],
    url: geot.getContext() + “/news/newslist/”
    };

    $(“#newsgrid”).jqxGrid({
    width: ‘100%’,
    source: source,
    theme: ‘office’,
    editable: true,
    selectionmode: ‘singlecell’,
    autoheight: true,
    sortable: true,
    altrows: true,
    columns: [
    { text: ‘ID’, datafield: ‘idn’, width: ‘5%’},
    { text: ‘Aonther ID’, datafield: ‘idn’, width: ‘40%’},
    ]
    });

    But when I run this, shows me error like datafield column invalid?
    Is it possible to use one datafield for two or more different columns?


    Peter Stoev
    Keymaster

    Hi mirko.fisic,

    Each column should be unique i.e the datafield should be unique as well.

    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.