jQuery MiniUI

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

datagrid中的 mini-combobox [复制链接]

Rank: 6Rank: 6

跳转到指定楼层
楼主
发表于 2016-3-22 16:12:34 |只看该作者 |倒序浏览
datagrid中我是这么写的一列                <div type="comboboxcolumn" field="PollutantsName" width="100" headeralign="center">
                    污染物名称
                    <input property="editor" class="mini-combobox" style="width:100%;" data="PollutantName" textfield="text" valuefield="id" />      </div>





然后datagrid的OnCellBeginEdit2方法中我是这么写的


        function OnCellBeginEdit1(e) {


            if (e.field == "PollutantsName") {


                if (e.row.Type == 1) {

                    mini.get("grid_SummarPollution").getCellEditor(e.column._index, e.rowIndex).setData(PollutantName1)

                }

                if (e.row.Type == 2) {
                    mini.get("grid_SummarPollution").getCellEditor(e.column._index, e.rowIndex).setData(PollutantName2)

                }
                if (e.row.Type == undefined) {
                    mini.get("grid_SummarPollution").getCellEditor(e.column._index, e.rowIndex).setData(PollutantName)
                }

            }

        }


但是当我保存 Type =1的时候, Type =2后面的值就不显示了,然后点击这个combox也发现也有


Rank: 8Rank: 8

沙发
发表于 2016-3-22 16:26:24 |只看该作者
但是当我保存 Type =1的时候, Type =2后面的值就不显示了,然后点击这个combox也发现也有
这是我不太明白
动态设置数据源直接e.editor.setData(data);

Archiver|普加软件

GMT+8, 2024-7-7 20:09 , Processed in 1.036627 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部