how to add a new row in top of a json datatable with already existing records

限于喜欢 提交于 2019-12-12 14:33:06

问题


I am trying to add a row in top of a datatable which shows sum of a column "amount".I am using json datatable(jquery plugin) list to display datatable. How can i add this row in top of datatable with existing rows?


回答1:


I think this code will help you

var json = '{ "uid": "user123", "firstName": "User", "lastName": "Theuser" }';
userTable.fnAddData(json);

Please refer the below link

JsonDatatable

Or

At the time of fetching data from table take sum also and make it as first row



来源:https://stackoverflow.com/questions/24626611/how-to-add-a-new-row-in-top-of-a-json-datatable-with-already-existing-records

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!