datagrid 动态生成列的问题
要求:根据用户选择的时间段动态生成列,如下
卡在了当用户选择时间段后点击‘go’按钮,该怎么修改datagrid中的列名?请大神用个简单的示例指点下
------解决方案-------------------- data-options="url: 'get_salesquantityper.php', singleSelect: true, rownumbers:true "
>
Category
//include "t.php";
initRows1($x1, $x2);//initRows1方法正确输出
?>
initRows2($x1, $x2);
?>
用个容器括起datagrid的容器,查询后清空容器里面easyui生成的datagrid代码,easyui没有提供更改columns配置的方法,也没有注销datagrid的方法,只能靠清空容器来移除datagrid了。如果你用的jqgrid有提供注销jqgrid的功能
点击查询$('#dvDataGrid').html('<table id="salesquantityper"></table>')<br />//参考你另外的那个帖子,用ajax获取到columns的内容后重新调用$('#salesquantityper').datagrid()的方法生成datagrid对象加载columns新配和数据
每个人都需要一台速度更快、更稳定的 PC。随着时间的推移,垃圾文件、旧注册表数据和不必要的后台进程会占用资源并降低性能。幸运的是,许多工具可以让 Windows 保持平稳运行。
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号