【发布时间】:2014-09-10 09:15:28
【问题描述】:
我有一个 ext.net v2.5 组合框,我试图在服务器端对组合框进行数据绑定,使用 .net 数据表加载关联存储,但不工作。
任何想法如何完成这些。将数据表绑定到组合框?
<ext:ComboBox ID="ddlProduct" runat="server" ValueField="IDProduct" DisplayField="ProductName" FieldLabel="Product" LabelWidth="50" Width="250">
<Store>
<ext:Store runat="server" ID="ddlProductStore">
<Model>
<ext:Model runat="server">
<Fields>
<ext:ModelField Name="IDProduct" />
<ext:ModelField Name="ProductName" />
</Fields>
</ext:Model>
</Model>
</ext:Store>
</Store>
</ext:ComboBox>
服务器端代码:
ddlProductStore.DataSource = MyApp.Data.DataRepository.Provider.ExecuteDataSet("sp_GetSegmentProducts ", 1).Tables(0)
ddlProductStore.DataBind()
【问题讨论】:
-
继续对我投反对票,哈罗德。你的日子屈指可数。是的,我知道是你。你没有课,你知道吗?你个懒人。在您的题外话stackoverflow.com/q/36356995 看到我的许多问答后。
-
@Fred-ii,这不是一个聊天网站。如果对帖子有任何话要说。请告诉我。
标签: c# asp.net data-binding combobox ext.net