提交用户数据jqgrid
我尝试根据我发送的参数返回网格数据,我向网格添加了新按钮:
jq("#grid").navButtonAdd('#pager',
{ caption:"Get Only The Latest Data(Ignores old)",
buttonicon:"ui-icon-plus",
onClickButton: setUniqueValue,
position: "last",
title:"",
cursor: "pointer"
}
);
我在初始网格/页面加载时隐藏了值为 false 的元素 span
,并且我设置单击上面的按钮时它为 true :
function setUniqueValue(){
jq("#unique").text("true");
jq("#grid").trigger("reloadGrid");
}
所以我通过 postData: {latest : jq("#unique").text()}, 将此值发送到服务器,
但这始终是相同的初始值 false,我的意思是这必须是可能的?因为这就是搜索的工作方式,一开始它是 false,然后当您单击查询时将其设置提交为 true 或类似的东西,有人知道如何做到这一点吗?
I'm try to return grid data based on the parameter I send, I added new button to my grid :
jq("#grid").navButtonAdd('#pager',
{ caption:"Get Only The Latest Data(Ignores old)",
buttonicon:"ui-icon-plus",
onClickButton: setUniqueValue,
position: "last",
title:"",
cursor: "pointer"
}
);
I have hidden element span
with the value false at the initial grid/page load, and I set it to true when this above button is clicked :
function setUniqueValue(){
jq("#unique").text("true");
jq("#grid").trigger("reloadGrid");
}
So I'm sending this value to the server trough postData: {latest : jq("#unique").text()},
But this has always the same initial value false, I mean this has to be possible? Because that is how the search works, its false at the begining then when you click on the query submit its set to true or something like that, anybody knows how to do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我无法理解您到底想要做什么,但您应该将
postData
的latest
属性的定义更改为以下内容:I can't follow what you exactly want to do, but you should change the definition of
latest
property ofpostData
to the following: