简体   繁体   中英

jqgrid highest value in a column

I have a jqgrid in which I have 7 column and one of them in time in milliseconds.

Is there a way by which I can get the highest value form a particular column?

In short what I need is the the complete row details whether time taken is the highest?

You can use footerrow: true option to add footer row to the grid. Additionally you can place some additional code in loadComplete which fill the footer on every refilling of the grid. The code in loadComplete can call getCol method with "max" as the value for the last mathoperation parameter. It will get you the required value. Then you need just call footerData with "set" action to set the calculated value in the corresponding column of the footer row. Look the demo from the old answer . You need just replace "sum" operation used in the demo to the "max" .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM