本文介绍了ASP.NET中的绑定问题可编辑组合框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


这是Ramesh,虽然绑定中"未显示可编辑的组合框数据(项目),但其中有项目计数.我正在使用3.5 ajaxtoolkit dll,我在此处粘贴任何人发现任何错误的信息,请告诉我.


This is Ramesh, While Binding editable combobox data(Item) not showing, but item count are there. i''m using 3.5 ajaxtoolkit dll i''m paste that over here anyone find anything wrong let me know.

<CC1:ComboBox ID="ComboBox1"  runat="server" DropDownStyle="DropDown" AutoCompleteMode="None"

CaseSensitive="false" RenderMode="Block" AutoPostBack="false" Font-Names="Comic Sans MS"

Font-Size="Large" ForeColor="DeepPink">
</CC1:ComboBox>


-绑定代码------------------------


--Binding Code------------------------

ComboBox1.DataSource = dsOfficeLocation.Tables(0)
ComboBox1.DataValueField = "Office_Location"
ComboBox1.DataTextField = "Office_Location"
ComboBox1.DataBind()
ComboBox1.Items.Insert(0, "--Select--")
ComboBox1.SelectedIndex = 0 



提前祝愿!
Ramesh M.



Advance Wishes!
Ramesh M.

推荐答案

ComboBox1.DataValueField = "Office_Location";
ComboBox1.DataTextField = "Office_Location";
ComboBox1.DataSource = dsOfficeLocation.Tables(0)
ComboBox1.DataBind();
ComboBox1.Items.Insert(0, "--Select--");


Replace RenderMode="Block" with the RenderMode="Inline"



这篇关于ASP.NET中的绑定问题可编辑组合框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-26 04:41
查看更多