使用javascript从用户界面动态排序datatable列 [英] dynamic ordering of datatable column from user interface using javascript

查看:96
本文介绍了使用javascript从用户界面动态排序datatable列的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个要导出到Excel的数据表.但是要求是用户应该能够使用下拉菜单从UI设置列的顺序,就像MOSS 2007中列表的视图"一样,用户可以选择列,然后使用下拉菜单.

请为此提出建议.

Hi,
I have a datatable that is to be exported to an excel. But the requirement is that the user should be able to set the order of the column from UI using a dropdown just like in case of a "view" of a list in MOSS 2007, where user can select the column and then choose the ordering using a dropdown.

Please suggest some fix for this.

推荐答案


可以使用服务器端代码来代替Java脚本.

在当时导出为ex​​cel的代码中,获取一张表并根据用户需要复制该表上的列

Instead of java script use the server side code to do that.

In code when you export to excel at that time take one table and copy the your columns on that table as user want


这篇关于使用javascript从用户界面动态排序datatable列的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆