jQWidgets Forums

jQuery UI Widgets Forums Grid boundindex undefined on groups

This topic contains 3 replies, has 2 voices, and was last updated by  admin 4 years, 11 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
  • boundindex undefined on groups #112510

    Mehdi
    Participant

    Hi

    The sample is :

    <div id=’jqxWidget’>
    <div id=”jqxgrid”></div>
    </div>

    var data = generatedata(50);
    var source = {
    localdata: data,
    datafields: [{
    name: ‘firstname’,
    type: ‘string’
    }, {
    name: ‘lastname’,
    type: ‘string’
    }, {
    name: ‘productname’,
    type: ‘string’
    }, {
    name: ‘date’,
    type: ‘date’
    }, {
    name: ‘quantity’,
    type: ‘number’
    }, {
    name: ‘price’,
    type: ‘number’
    }],
    datatype: “array”
    };

    var adapter = new $.jqx.dataAdapter(source);
    $(“#jqxgrid”).jqxGrid({
    width: 500,
    theme: ‘energyblue’,
    source: adapter,
    groupable: true,
    groups: [‘firstname’],
    columns: [{
    text: ‘First Name’,
    datafield: ‘firstname’,
    width: 90
    }, {
    text: ‘Last Name’,
    datafield: ‘lastname’,
    width: 90
    }, {
    text: ‘Product’,
    datafield: ‘productname’,
    width: 170
    }, {
    text: ‘Order Date’,
    datafield: ‘date’,
    width: 160,
    cellsformat: ‘dd-MMMM-yyyy’
    }, {
    text: ‘Quantity’,
    datafield: ‘quantity’,
    width: 80,
    cellsalign: ‘right’
    }, {
    text: ‘Unit Price’,
    datafield: ‘price’,
    cellsalign: ‘right’,
    cellsformat: ‘c2’
    }]
    });
    var bRows = $(“#jqxgrid”).jqxGrid(‘getboundrows’);
    alert(bRows[0].boundindex);

    but it returns 0 when comment => groups: [‘firstname’] line

    thanks

    boundindex undefined on groups #112511

    admin
    Keymaster

    Hi,

    Groups are dynamically generated. They are not data bound so the boundindex is undefined. This is the expected behavior.

    Best Regards,
    Peter

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

    boundindex undefined on groups #112524

    Mehdi
    Participant

    Hi Peter

    That’s true, but is i comment groups on definition and grid loads with no groups and i drag columns to group manually,
    the boundindex will not be undefined and the value is correct.

    how about that?

    thanks

    boundindex undefined on groups #112529

    admin
    Keymaster

    Hi Mehdi,

    Groups do not have boundindex. You should not try to use it in your apps.

    Best Regards,
    Peter

    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.