[英]jQuery Datatables: Ajax vs c# loading
Finally got datatables to properly retrieve, then format data for an application I am writing and after looking at the code, I began to wonder, is it better to allow datatables to retrieve the raw data and format it in the javascript of the view, or format the table data in a class before it's handed back to datatables?最后让数据表正确检索,然后为我正在编写的应用程序格式化数据,在查看代码后,我开始怀疑,允许数据表检索原始数据并在视图的 javascript 中对其进行格式化会更好,还是在将表数据交回数据表之前格式化类中的表数据?
My first instinct would to be to allow the class to do it, but, being new to jQuery, I was wondering if that WAS the way, then why would datatables have that much client side capability.我的第一直觉是允许类这样做,但是,作为 jQuery 的新手,我想知道这是否是这种方式,那么为什么数据表具有如此多的客户端功能。
Anyone have pros or cons for either way?任何一种方式都有优点或缺点吗?
Without knowing more, I would recommend formatting and styling on the client side.在不知道更多的情况下,我建议在客户端进行格式化和样式设置。 Here are a few thoughts...这里有一些想法......
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.