Dear Telerik,
I have created a template inside listBox like your example in the demo: http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/templates/defaultcs.aspx
but I don't want to create a static data, so I have created a list like the followin:
and the the aspx like the following:
the data are not displayed !!!!!
can you help me on this?
thanks,
Mohamed Taraman
I have created a template inside listBox like your example in the demo: http://demos.telerik.com/aspnet-ajax/listbox/examples/functionality/templates/defaultcs.aspx
but I don't want to create a static data, so I have created a list like the followin:
public
class
Spinning
{
public
string
Title {
get
;
set
; }
public
double
Price {
get
;
set
; }
public
int
Quantity {
get
;
set
; }
}
void
RadListBox5_Load()
{
List<Spinning> SpinningList =
new
List<Spinning>
{
new
Spinning { Title =
"Spinning Reel 1"
, Price = 99, Quantity = 1 },
new
Spinning { Title =
"Spinning Reel 2"
, Price = 199, Quantity = 1 }
};
RadListBox5.DataSource = SpinningList;
RadListBox5.DataBind();
}
<
telerik:RadListBox
ID
=
"RadListBox5"
runat
=
"server"
AllowTransfer
=
"true"
AutoPostBackOnTransfer
=
"true"
Height
=
"200px"
OnTransferred
=
"RadListBox5_Transferred"
SelectionMode
=
"Multiple"
TransferToID
=
"RadListBox6"
Width
=
"215px"
>
<
ButtonSettings
ShowTransferAll
=
"false"
VerticalAlign
=
"Middle"
/>
<
ItemTemplate
>
<
table
cellpadding
=
"1"
cellspacing
=
"0"
border
=
"0"
>
<
tr
>
<
td
><
b
><%# DataBinder.Eval(Container, "Attributes['Title']")%></
b
></
td
>
<
td
> [Price:</
td
>
<
td
><%# Convert.ToInt32(DataBinder.Eval(Container, "Attributes['Price']")).ToString("C0") %>]</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadListBox
>
the data are not displayed !!!!!
can you help me on this?
thanks,
Mohamed Taraman