jQuery MiniUI

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

grid combobox 怎么输入下拉框以外的值 [复制链接]

Rank: 3Rank: 3

跳转到指定楼层
楼主
发表于 2018-11-21 21:00:37 |只看该作者 |倒序浏览
  
    输入完之后 ,失去焦点就空了

Rank: 7Rank: 7Rank: 7

沙发
发表于 2018-11-22 09:44:46 |只看该作者
输入后失去焦点正常情况不会清除输入值,是不是你配置了valueFromSelect属性。

Rank: 3Rank: 3

板凳
发表于 2018-11-23 12:02:12 |只看该作者
没有配置valueFromSelect属性

<div enableHotTrack="true" data-options="{}" idfield="id" showPager="false" oncellbeginedit="esform.OnCellBeginEdit" oncellcommitedit="esform.OnCellCommitEdit" totalField="rowcount" ondrawcell="esform.drawcell" multiSelect="true" class="mini-datagrid" onload="esform.onFentryload" id="fentry1" editNextRowCell="true" dataField="rows" editNextOnEnterKey="true" virtualScroll="true" oncellendedit="esform.cellendedit" allowCellSelect="true" allowCellEdit="true" style="height:200px;" oncellclick="esform.cellclick" url="/ashx/Form/FormServerice.ashx?service=GetFentryData&amp;id=dcb6e521-1c79-4b77-a8a8-39e9acbdc7b9&amp;value=[#value#]&amp;index=1" name="fentry1" onheadercellclick="esform.onheadercellclick" onupdate="esform.gridUpDownLeftRightEvent">
                                        <div property="columns">
                                            <div type="indexcolumn" width="50" headerAlign="center" headerStyle="font-weight:bold">行号</div>
                                            <div field="string1" headerStyle="font-weight:bold" width="100" headerAlign="center" allowSort="false" autoShowPopup="true" type="comboboxcolumn">
                                                string1<input emptyText="请选择..." errorMode="border" allowInput="true" class="mini-combobox" data-options="{&quot;fentryfield&quot;:&quot;fentry1&quot;}" id="ftstring1" valueField="value" style="width:100px;" name="string1" property="editor" textField="text" autoshowpopup="true" url="/ashx/Form/FormServerice.ashx?service=GetComBoxInfo&amp;id=b8b3b424-ea72-43d1-a4ab-4c413ddf2f51&amp;type=combox"></input>
                                            </div>
                                        </div>
                                    </div>

Rank: 8Rank: 8

地板
发表于 2018-11-23 14:03:26 |只看该作者
kay 发表于 2018-11-23 12:02
没有配置valueFromSelect属性

type="comboboxcolumn" 有这类型的话,下拉数据是固定的,然后选项也必须是下拉中的,不能是输入的 。
如果你既要选择又要输入的话,请去掉这个特殊列,用field+displayField的方式,存储两个字段的数据来处理。
<div field="string1" displayField="string1_name" >
    <div proprety="editor" url="..">
   </div>
</div>
编辑结束,combobox会将选中项的Value数据更新到string1字段,text数据更新到string1_name。这时你也可以输入了。输入的数据就不会被清除掉。

Archiver|普加软件

GMT+8, 2024-9-17 04:33 , Processed in 1.047550 second(s), 10 queries .

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部