我在 JQGrid 中创建了一个自定义按钮以导出到 CSV,这是一些代码
content.AppendFormat(@"pager: $(""#{2}"") {1}).navGrid(""#{2}"", {0} edit: false, add: false, del: false {1})
.navButtonAdd(""#{2}"",
{0} caption:""Export to CSV file "",
position:""first"",
buttonicon:""none"",
onClickButton: function () {0}
alert('Made it to Export to CSV ...');
{1}
{1});
{3}.filterToolbar();
{1});
</script>", "{", "}", pagerID, tableID);
return content.ToString().ToControl("div");
问题是,我需要所有数据,而不仅仅是在 ui 中呈现的页面,所以我想在功能上使用内置的搜索以及与之关联的所有参数,但我还想附加 '&oper=csv ',我只是不知道该怎么做。我应该使用自定义按钮还是其他东西来做到这一点。