jQuery MiniUI

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

我在用DataGrid行编辑的时候 [复制链接]

Rank: 3Rank: 3

跳转到指定楼层
楼主
发表于 2012-6-13 08:51:35 |只看该作者 |倒序浏览
  我在用DataGrid行编辑的时候的时候,我在行中用TreeSelect,但我保存的时候无法获取到这个选择的Value和Text,还有,我还用了Commbox,也无法获取到Value,Text值,是怎么弄的?

                 <div id="datagrid1" class="mini-datagrid" style="width: 900px; height: 530px;" url="../Handle/AjaxService.aspx?method=SearchEmployees"
                idfield="id" allowresize="false" pagesize="20" multiselect="true">
                <div property="columns">
                    <div type="checkcolumn" width="5">
                    </div>
                    <div type="indexcolumn" width="10">
                    </div>
                    <div field="RightId" width="10" headeralign="center" allowsort="true">
                        权限Id
                    </div>
                    <div field="RightName" width="30" allowsort="true">
                        权限名称
                        <!--textbox editor-->
                        <input property="editor" class="mini-textbox" style="width: 100%;" />
                    </div>
                    <div field="ParentName" width="30" allowsort="true">
                        父权限
                        <!--spinner editor-->
                        <input property="editor" id="txtParentName" class="mini-treeselect" style="width: 150px;"
                            textfield="text" valuefield="id" url="../Handle/AjaxService.aspx?method=GetRightName"
                            value="1" shownullitem="true" required="true" />
                    </div>
                    <div field="Type1" width="30" allowsort="true">
                        目录类型
                        <!--textbox editor-->
                        <input id="combo1" property="editor" class="mini-combobox" style="width: 150px;"
                            textfield="text" valuefield="id" url="../Handle/AjaxService.aspx?method=GetTypes"
                            value="1" shownullitem="true" required="true" />
                    </div>
                    <div field="Url" width="30" allowsort="true" visible="false">
                    </div>
                </div>
            </div>

  不知道怎么获取到TreeSelect和Combobox的Value和TreeSelect?  如果单独使用,我知道获取。

Rank: 9Rank: 9Rank: 9

沙发
发表于 2012-6-13 08:52:25 |只看该作者
var edit = grid.getCellEditor("columnName");

Rank: 3Rank: 3

板凳
发表于 2012-6-13 08:58:52 |只看该作者
niko 发表于 2012-6-13 08:52
var edit = grid.getCellEditor("columnName");

问下,你这个columnName是 field  这个属性嘛?

  var edit = grid.getCellEditor("ParentName");
   我是这样用的,但还是获取不到啊获取的为null

Rank: 3Rank: 3

地板
发表于 2012-6-13 09:04:30 |只看该作者
niko 发表于 2012-6-13 08:52
var edit = grid.getCellEditor("columnName");

var edit = grid.getCellEditor("ParentName");
我这个ParentName是field这个属性


  
<div field="ParentName" width="30" allowsort="true">
                        父权限
                        <!--spinner editor-->
                        <input property="editor" id="txtParentName" class="mini-treeselect" style="width: 150px;"
                            textfield="text" valuefield="id" url="../Handle/AjaxService.aspx?method=GetRightName"
                            value="1" shownullitem="true" required="true" />
                    </div>

Rank: 9Rank: 9Rank: 9

5#
发表于 2012-6-13 09:15:44 |只看该作者
在启动行编辑后,才能获得编辑器控件对象。
另外,如果你要处理保存,其实不需要找到编辑器控件对象。
参考示例:http://miniui.com/demo/#src=datagrid/rowedit.html

Rank: 3Rank: 3

6#
发表于 2012-6-13 09:22:28 |只看该作者
niko 发表于 2012-6-13 09:15
在启动行编辑后,才能获得编辑器控件对象。
另外,如果你要处理保存,其实不需要找到编辑器控件对象。
参考 ...

哦 谢谢
  我还是换一种方式做,用弹出面板做吧..  
谢谢了

Archiver|普加软件

GMT+8, 2024-9-30 12:37 , Processed in 1.042773 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部