jQWidgets Forums

jQuery UI Widgets Forums Grid Grid Group error

This topic contains 4 replies, has 2 voices, and was last updated by  pablosym 7 years, 1 month ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
  • Grid Group error #100107

    pablosym
    Participant

    hello, in the grid I have 2 rows and when I group them by two columns it duplicates the last record giving 3 rows.
    How can I add an image of the error?
    Thank you

    Grid Group error #100132

    Martin
    Participant

    Hello pablosym,

    Can you, please, send your code so I can take a look at it?
    Thank you!

    Best Regards,
    Martin

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

    Grid Group error #100183

    pablosym
    Participant

    function cargarGrilla(objData) {

    //localData = obj;

    var source =
    {
    dataType: “json”,
    pagesize: 100,
    localdata: objData,
    datafields:
    [
    { name: ‘fecha’, type: ‘string’ },
    { name: ‘razonSocial’, type: ‘string’ },
    { name: ‘remito’, type: ‘string’ },
    { name: ‘nombre’, type: ‘string’ },
    { name: ‘observacion’, type: ‘string’ },
    { name: ‘codigo’, type: ‘string’ },
    { name: ‘producto’, type: ‘string’ },
    { name: ‘cantidad’, type: ‘int’ },
    { name: ‘costo’, type: ‘float’ }
    ]
    };

    var dataAdapter = new $.jqx.dataAdapter(source);

    // initialize jqxGrid
    $(“#jqxgrid”).jqxGrid(
    {
    width: ‘100%’,
    height: ‘470px’,
    source: dataAdapter,
    editable: false,
    selectionmode: ‘singlerow’,
    editmode: ‘click’,
    groupable: true,
    groups: [‘fecha’, ‘razonSocial’],
    //groupsrenderer: groupsrenderer,
    showgroupaggregates: true,
    showstatusbar: true,
    showaggregates: true,
    statusbarheight: 25,
    autoshowfiltericon: true,
    filterable: true,
    sortable: true,
    theme: ‘office’,
    pageable: true,
    pagesizeoptions: [‘100’, ‘500’, ‘1000’],
    localization: getLocalization(‘es-AR’),
    columnsresize: true,
    rendered: function (type) {
    if (type == “full”) {
    $(“#jqxgrid”).jqxGrid(‘expandallgroups’);
    }
    },
    columns: [
    { text: ‘FECHA’, datafield: ‘fecha’, cellsformat: ‘d’, cellsalign: ‘center’, align: ‘center’ },
    { text: ‘PROVEEDOR’, datafield: ‘razonSocial’, align: ‘center’ },
    { text: ‘REMITO’, datafield: ‘remito’, align: ‘center’ },
    { text: ‘USUARIO’, datafield: ‘nombre’, align: ‘center’ },
    { text: ‘OBSERVACION’, datafield: ‘observacion’, align: ‘center’ },
    { text: ‘CODIGO’, datafield: ‘codigo’, align: ‘center’ },
    { text: ‘PRODUCTO’, datafield: ‘producto’, align: ‘center’ },
    {
    text: ‘CANTIDAD’, datafield: ‘cantidad’, aggregates: [“sum”], cellsalign: ‘right’, align: ‘center’, cellsformat: ‘d2’,
    cellsrenderer: function (row, column, value, defaultRender, rowData) {
    if (value.toString().indexOf(“Sum”) >= 0) {
    return defaultRender.replace(“Sum:”, “Tot “);
    }
    },
    aggregatesrenderer: function (aggregates, column, element) {
    if (aggregates.sum !== undefined)
    return ‘<div style=”position: relative; margin-top: 4px; margin-right:5px; text-align: right; overflow: hidden;”>’ + “Total” + ‘: ‘ + aggregates.sum + ‘</div>’;

    }
    },
    {
    text: ‘COSTO’, datafield: ‘costo’, aggregates: [“sum”], cellsalign: ‘right’, align: ‘center’, cellsformat: ‘d2’,
    cellsrenderer: function (row, column, value, defaultRender, rowData) {
    if (value.toString().indexOf(“Sum”) >= 0) {
    return defaultRender.replace(“Sum:”, “Tot “);
    }
    },
    aggregatesrenderer: function (aggregates, column, element) {
    if (aggregates.sum !== undefined)
    return ‘<div style=”position: relative; margin-top: 4px; margin-right:5px; text-align: right; overflow: hidden;”>’ + “Total” + ‘: ‘ + aggregates.sum + ‘</div>’;

    }
    }
    ]
    });

    Grid Group error #100191

    Martin
    Participant

    Hello pablosym,

    Thank you for your feedback! It seems that this is an issue.
    What you can do to fix it is to either remove the group agregates or the paging.

    Best Regards,
    Martin

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

    Grid Group error #100203

    pablosym
    Participant

    Gracias Martin!

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

You must be logged in to reply to this topic.