jQuery MiniUI

 找回密码
 立即注册
查看: 2063|回复: 3
打印 上一主题 下一主题

datagrid 中的class="mini-combobox "的一列 [复制链接]

Rank: 6Rank: 6

跳转到指定楼层
楼主
发表于 2014-5-6 16:09:02 |只看该作者 |倒序浏览
对于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 ,但是没有用


Rank: 8Rank: 8

沙发
发表于 2014-5-6 16:14:06 |只看该作者
表格列的联动编辑啊

我们不是有现成例子的吗?
http://www.miniui.com/demo/#src=datagrid/celllinkedit.html

Rank: 8Rank: 8

板凳
发表于 2014-5-6 16:21:25 |只看该作者
动态改变combobox的下拉数据?
oncellbeginedit的时候处理吧
e.editor.setData(xxx)

Rank: 6Rank: 6

地板
发表于 2014-5-6 17:17:33 |只看该作者
factory 发表于 2014-5-6 16:14
表格列的联动编辑啊

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

谢谢,问题解决了

Archiver|普加软件

GMT+8, 2024-9-29 01:30 , Processed in 1.058006 second(s), 9 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部