jQWidgets Forums

jQuery UI Widgets Forums Grid agreegate position

Tagged: ,

This topic contains 6 replies, has 2 voices, and was last updated by  lineker 12 years ago.

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
  • agreegate position #23362

    lineker
    Participant

    Hi I have a grid which has both toolbar at up side and page navigaton at bottom
    When I added aggregate function, it was displayed over my toolbar at which I added datetime input and datetime input was lost.
    Why did not aggregate column place at bottom?

    agreegate position #23363

    lineker
    Participant

    Hi,

    I added Status bar and aggregagte row is placed on it, there is no problem now

    agreegate position #23364

    lineker
    Participant

    Hi,

    I have another problem.
    agrregate function finds the number of records from the records displayed at grid
    But I am using virtual mode. How can I display number of all records as aggregate value?

    agreegate position #23368

    Peter Stoev
    Keymaster

    Hi,

    It is not possible to aggregate something which is not loaded in the Grid, because in virtual mode, the data loading is on demand. A possible solution would be to use the custom rendering capabilities of the aggregates and query your DB for the aggregates.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

    agreegate position #23428

    lineker
    Participant

    Hi Peter,

    I am using virtualmode.
    I want to assign manual value but it does not work
    My aggregate code is below:
    I use a counter and assing harccode value, 155 when counter value is 25 but it does not work, why?
    If it works I can apply aggregate at virtual mode

    var counter = 0;

    { text: RS.Stock, datafield: ‘R.Stock’, width: 50, cellsalign: ‘center’, cellsrenderer: cellsrenderer,
    aggregates: [{ ‘S+’:
    function (aggregatedValue, currentValue) {
    counter += 1;
    if (counter == 25) {
    return aggregatedValue + 155;
    }
    return aggregatedValue;
    }
    },

    { ‘S-‘:
    function (aggregatedValue, currentValue) {
    if (currentValue == 1) {
    return aggregatedValue + 1;
    }
    return aggregatedValue;
    }
    }
    ]
    },

    agreegate position #23445

    lineker
    Participant

    Hi Peter,

    Can not I assign manıel value?
    I will calculate min vakue, max value and assing myself

    agreegate position #23446

    lineker
    Participant

    Hi Peter I found solution at virtual mode.
    I will calculate Stock+ (stock_plus) and Stock- (stock_minus) from sql and assign as follow:

    aggregates: [{ ‘Stock +’:
    function (aggregatedValue, currentValue) {
    return stock_plus;
    }
    },
    { ‘Stock -‘:
    function (aggregatedValue, currentValue) {
    return stock_minus;
    }
    }
    ]
    },

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

You must be logged in to reply to this topic.