|
Rank: Newbie Groups: Member
Joined: 5/2/2010 Posts: 5
|
I'm confused. I thought the ListBox control can databind to a SQLDataSource control. But no data displays in the ListBox. Below is the ListBox control code and the SqlDataSource code. What am I doing wrong???
Code: HTML/ASPX
<div style="width: 200px; height: 120px; font-family: Verdana; font-size: 12px; border: solid 1px #909090;
padding: 4px; background-color: white;">
<eo:ListBox ID="ListBox2" runat="server" ControlSkinID="None"
DataSourceID="SidingBrandData" DataTextField="Brand" DataValueField="Brand"
Height="100px" Width="200px">
<BodyStyle CssText="border: solid 1px #c6c7d2;background-color:white;" />
<DisabledItemStyle CssText="background-color:white; color: #c0c0c0; padding: 2px;" />
<ItemStyle CssText="padding: 2px; background-color:white; color: black;" />
<ListBoxStyle CssText="font-family:Tahoma; font-size:11px;" />
<MoreItemsMessageStyle CssText="padding:2px;" />
<SelectedItemStyle CssText="padding: 2px; background-color:#3399ff; color:white;" />
</eo:ListBox>
</div>
<asp:SqlDataSource ID="SidingBrandData" runat="server" ConnectionString="<%$ ConnectionStrings:3mDatabaseConnectionString %>"
SelectCommand="SELECT [Brand] FROM [Siding Component Brand] ORDER BY [Brand]">
</asp:SqlDataSource>
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have confirmed this to be a bug. We will fix it and post an update build as soon as possible.
Thanks!
|
|
Rank: Newbie Groups: Member
Joined: 5/2/2010 Posts: 5
|
Thanks.... Do you have a suggested work-around until this fix and the update build is available?
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You would need to use a DataTable instead of SqlDataSource. In another word, declarative data source doesn't work in this build. So you must set its DataSource to an ADO.NET object such as DataTable and call DataBind explicitly.
Thanks
|
|
Rank: Newbie Groups: Member
Joined: 5/2/2010 Posts: 5
|
Thank you!
|
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
We have posted a new build that should fix this problem. You can download it from our download page.
Thanks!
|
|