Ext Combobox 显示valueField值 不显示displayField问题
2016-01-04 12:38
751 查看
设置Combobox值的时候,按照下链接进行设置,但是依然显示valueField值不显示displayField的值
http://blog.csdn.net/zengjian2008c/article/details/7454590
然后试着在后台设置值的时候加了一个toString()方法,竟然好了,贴出代码
前台:
<span style="white-space:pre"> </span><ext:ComboBox ID="cboGroupName" FieldLabel="工作部门" runat="server" DisplayField="cGroupName"
ValueField="cGroupCode" TypeAhead="false" MinChars="0" LabelAlign="Right" LabelWidth="100"
TriggerAction="All" Editable="false" Width="250" IndicatorText="*" AllowBlank="false">
<Triggers>
<ext:FieldTrigger Icon="Clear" Qtip="清空" />
</Triggers>
<Listeners>
<TriggerClick Handler="this.clearValue();" />
</Listeners>
<Store>
<ext:Store ID="storeGroupName" runat="server">
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="noGroup">
<Fields>
<ext:ModelField Name="noGroup" />
<ext:ModelField Name="cGroupCode" />
<ext:ModelField Name="cGroupName" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>
后台:
cboGroupName.SetValue(Convert.ToString(group.NoGroup));
cboGroupName.SetRawValue(group.CGroupName);
http://blog.csdn.net/zengjian2008c/article/details/7454590
然后试着在后台设置值的时候加了一个toString()方法,竟然好了,贴出代码
前台:
<span style="white-space:pre"> </span><ext:ComboBox ID="cboGroupName" FieldLabel="工作部门" runat="server" DisplayField="cGroupName"
ValueField="cGroupCode" TypeAhead="false" MinChars="0" LabelAlign="Right" LabelWidth="100"
TriggerAction="All" Editable="false" Width="250" IndicatorText="*" AllowBlank="false">
<Triggers>
<ext:FieldTrigger Icon="Clear" Qtip="清空" />
</Triggers>
<Listeners>
<TriggerClick Handler="this.clearValue();" />
</Listeners>
<Store>
<ext:Store ID="storeGroupName" runat="server">
<Model>
<ext:Model ID="Model1" runat="server" IDProperty="noGroup">
<Fields>
<ext:ModelField Name="noGroup" />
<ext:ModelField Name="cGroupCode" />
<ext:ModelField Name="cGroupName" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>
后台:
cboGroupName.SetValue(Convert.ToString(group.NoGroup));
cboGroupName.SetRawValue(group.CGroupName);
相关文章推荐
- iOS UI-表格控制器(UITableView)-基本使用
- iOS中UITableView性能优化
- 在UITableView或UICollectionView的自定义的cell里添加手势或button,响应方法时如何传参数
- iOS 中一个带尖角并且尖角指向固定点的UILabel
- 连接数据库超时设置autoReconnect=true
- UITabBarController使用
- 让ThreadPoolExecutor的workQueue占满时自动阻塞submit()方法
- Build Action
- UITextField 光标的缩进问题
- getContextPath、getServletPath、getRequestURI的区别
- arm交叉编译器gnueabi、none-eabi、arm-eabi、gnueabihf、gnueabi区别
- iOS 9中UIDynamics实现真正的圆形碰撞
- php手册-关于true和false
- 自定义UISearchiBar
- TreeMap按照value进行排序
- 取消UITableViewCell的分割线偏移问题
- IOS开发之UIScrollViewDelegate详解
- 《iOS Human Interface Guidelines》——HomeKit
- iOS开发之UINavigationBar(一)
- UINavigationController使用