- 注册时间
- 2013-8-13
- 最后登录
- 2017-4-17
- 阅读权限
- 10
- 积分
- 1519
- 精华
- 0
- 帖子
- 418
|
对于datagird ,我会按着厂id查询数据在datagrid 中显示,其中datagrid中有这么一列: <div name="OpcServerID" field="OpcServerID" headeralign="center" allowsort="true"> OpcServerID
<input id="OpcServerIDData" property="editor" name="PlantID" class="mini-combobox "
textfield="ServerID" valuefield="ServerID" data="ServerData" />
</div>
对于这一写,我想做的是,当我按厂id=1,查询出数据后 data="ServerData" 中的ServerData 数据和当我按厂id=2,查询出数据后的ServerData是不一样的,那我现在的做法是:
function getServerData() {
PlantID = mini.get("PlantID").getValue();
$.ajax({
url: "Data/DataService_Help.aspx?method=GetServerID",
data: { PlantID: PlantID },
type: "post",
success: function (text, e) {
if (text) {
ServerData = mini.decode(text);
}
else {
ServerData = null;
}
grid = mini.get("datagrid1");
grid.load({ PlantID: PlantID })
grid.reload();
},
error: function (jqXHR, textStatus, errorThrown) {
grid.unmask();
alert(jqXHR.responseText);
}
});
}
在grid. load之前重新查询到ServerData ,但是没有用
|
|