RadListBox

0 Answers 30 Views
ListBox
anna
Top achievements
Rank 1
Bronze
Iron
anna asked on 11 Feb 2022, 01:37 AM | edited on 11 Feb 2022, 02:01 AM

Hello

Attacted File : Res27_aspx.txt, Res27_aspx_cs.txt

 

In Attacted File Res27_aspx.txt,

<telerik:RadListBox ID="listAssign" runat="server" DataTextField="ORDER_NO" DataValueField="PLAN_TIME" Height="550px" SelectionMode="Multiple" Width="550px">
<ItemTemplate> 
<telerik:RadLabel ID="lbOrderNo" runat="server" Text='<%# Eval("ORDER_NO") %>'  ></asp:Label> 
<telerik:RadLabel ID="lbPlanTime" runat="server" Text='<%# Eval("PLAN_TIME") %>' ></asp:Label>
</ItemTemplate>
</telerik:RadListBox>

 

In Attacted File Res27_aspx.cs.txt,

DataTable dt = bzobj.GetWorkOrderList(sShopCd, sLineCode, sPlanDate);

listAssign.DataSource = dt;

 

Why not?
waiting for answer

Doncho
Telerik team
commented on 15 Feb 2022, 02:26 PM

Hi Anna,

Could you please clarify what is the problem you are facing with the current implementation? Is there any error thrown or any unexpected behavior?

One thing I have noticed as a possible problem with binding data to the RadListBox is that there is no explicit call to the DataBind() method of the RadListBox control.

Note that when the DataSource of the RadListBox is set programmatically you should call the DataBind() method to populate the ListBox. Check out the Binding to DataTable, DataSet or DataView article, explaining how you can bind ListBox to a DataTable object.

No answers yet. Maybe you can help?

Tags
ListBox
Asked by
anna
Top achievements
Rank 1
Bronze
Iron
Share this question
or