嘿, 我无法使用sql数据源填充下拉列表--aspx是
Hey, I am not able to Populate dropdownlist with sql data source--aspx is
<telerik:GridDropDownColumn HeaderText="Items" UniqueName="column1" DataSourceID="SqlDataSource1" ListTextField="ProductName" ListValueField="Pid" DataField="ProductName" > </telerik:GridDropDownColumn>Ans数据源是-
Ans datasource is--
<asp:SqlDataSource ID="SqlDataSource1" runat="server" DataSourceMode="DataReader" ConnectionString="<%$ ConnectionStrings:ChalkHillConnectionString3 %>" SelectCommand="SELECT [ProductName] FROM [tblProducts] ORDER BY [Pid]"></asp:SqlDataSource> 我正在尝试从tblProducts的ProductName列填充ddl. 似乎不起作用''.我收到此错误- ``System.Data.Common.DataRecordInternal''不包含名称为``Pid''的属性 请帮助.... 谢谢 Amit
e> I am trying to populate ddl from ProductName column of my tblProducts. Does''nt seem to be workin''.I am getting this error-- ''System.Data.Common.DataRecordInternal'' does not contain a property with the name ''Pid'' Plz help.. Thanks Amit
推荐答案ConnectionStrings:ChalkHillConnectionString3 %> " span> SelectCommand =" 从[tblProducts]中选择[ProductName]的顺序为[Pid]" > < /asp:SqlDataSourc ConnectionStrings:ChalkHillConnectionString3 %>" SelectCommand="SELECT [ProductName] FROM [tblProducts] ORDER BY [Pid]"></asp:SqlDataSourc
e> 我正在尝试从tblProducts的ProductName列填充ddl. 似乎不起作用''.我收到此错误- ``System.Data.Common.DataRecordInternal''不包含名称为``Pid''的属性 请帮助.... 谢谢 Amit
e> I am trying to populate ddl from ProductName column of my tblProducts. Does''nt seem to be workin''.I am getting this error-- ''System.Data.Common.DataRecordInternal'' does not contain a property with the name ''Pid'' Plz help.. Thanks Amit
这应该有效. This should work. // ListValueField="Pid" SelectCommand="SELECT [ProductName],[Pid] FROM [tblProducts] ORDER BY [Pid]"
更多推荐
将GridDropDownColumn绑定到SQL数据源
发布评论