在没有ajax请求的情况下将数据添加到jQuery-Flexigrid [英] Adding data to jQuery-Flexigrid without ajax-request
本文介绍了在没有ajax请求的情况下将数据添加到jQuery-Flexigrid的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想保存一些不需要的请求和第一次显示表的时间,所以我想也许我可以直接设置初始数据而不需要任何ajax请求。我试过这样:
I want to save some unneeded requests and time for displaying a table the first time and so I thought maybe I could set the initial data directly without any ajax-request. I tried it like that:
$('#testTable').flexAddData('[formatted json here]');
以及
$('#testTable').addData('[formatted json here]');
但它没有任何影响。我可以这样做吗?什么是正确的语法?
But it hasn't any effect. Can I do that and what is the right syntax?
推荐答案
您使用的是 eval()
?
$("#testTable").flexAddData(eval('[formatted json here]'));
或尝试
$("#testTable").flexAddData(eval('[formatted json here]')).flexReload();
希望这会有所帮助
这篇关于在没有ajax请求的情况下将数据添加到jQuery-Flexigrid的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文