jQuery MiniUI

标题: datagrid 中的class="mini-combobox "的一列 [打印本页]

作者: 小葱儿    时间: 2014-5-6 16:09:02     标题: datagrid 中的class="mini-combobox "的一列

对于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 ,但是没有用



作者: factory    时间: 2014-5-6 16:14:06

表格列的联动编辑啊

我们不是有现成例子的吗?
http://www.miniui.com/demo/#src=datagrid/celllinkedit.html
作者: felt    时间: 2014-5-6 16:21:25

动态改变combobox的下拉数据?
oncellbeginedit的时候处理吧
e.editor.setData(xxx)
作者: 小葱儿    时间: 2014-5-6 17:17:33

factory 发表于 2014-5-6 16:14
表格列的联动编辑啊

我们不是有现成例子的吗?

谢谢,问题解决了




欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2