Jqgrid issue with footer text format

匆匆过客 提交于 2020-01-15 06:11:47

问题


In Jqgrid for some columns I have set as link. And also for those columns I have set footer (MAX). But the issue is, configured link is also getting added to the footer value, which is not expected.

Any help is appreciated.

Thanks in advance.


回答1:


I think the problem is how you add the footer information. If you use footerData you can use false as the last parameter (the format parameter) of footerData. In the case the footer data will not be formatted by the standard formatter of the corresponding column. As the example see the demo.

If you add the data from the server using userdata and use userDataOnFooter jqGrid option the formatter parameter will be alway used as true (see the source code of jqGrid here and here). As a workaround you can remove userDataOnFooter:true setting and add the footer information manually with respect of footerData inside your localComplete event handle:

var myGrid = $("#list"); // your grid
// ...

// inside of localComplete you can add the data
var userData = myGrid.jqGrid("getGridParam","userData");
myGrid.jqGrid("footerData","set",userData,false);


来源:https://stackoverflow.com/questions/5878900/jqgrid-issue-with-footer-text-format

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