I have a template defined in the ASPX, and am adding items in code behind from LINQ object.
The template does not show the attributes. I've read some threads and am not really sure what is possible. Can you please tell me how to do this?
ASPX Page is like this:
So I think my listbox would have
"one"
"two"
"three"
But it is three rows that are blank.
How can I get the template working with the attributes?
Screenshot attached of three blank rows:
The template does not show the attributes. I've read some threads and am not really sure what is possible. Can you please tell me how to do this?
ASPX Page is like this:
<
telerik:RadListBox
ID
=
"EmployeesComplianceLevel"
runat
=
"server"
Width
=
"100%"
OnClientSelectedIndexChanged
=
"EmployeesComplianceLevelChanged"
style
=
"margin-bottom: 10px"
>
<
ItemTemplate
>
<
font
color
=
"black"
><%# DataBinder.Eval(Container, "Text")%> </
font
>
</
ItemTemplate
>
</
telerik:RadListBox
>
RadListBoxItem listitem1 =
new
RadListBoxItem();
listitem1.Value =
"1"
;
listitem1.Attributes.Add(
"Text"
,
"one"
);
EmployeesComplianceLevel.Items.Add(listitem1);
RadListBoxItem listitem2 =
new
RadListBoxItem();
listitem2.Value =
"2"
;
listitem2.Attributes.Add(
"Text"
,
"two"
);
EmployeesComplianceLevel.Items.Add(listitem2);
RadListBoxItem listitem3 =
new
RadListBoxItem();
listitem3.Value =
"3"
;
listitem3.Attributes.Add(
"Text"
,
"three"
);
EmployeesComplianceLevel.Items.Add(listitem3);
EmployeesComplianceLevel.DataBind();
foreach
(RadListBoxItem item
in
EmployeesComplianceLevel.Items)
item.DataBind();
So I think my listbox would have
"one"
"two"
"three"
But it is three rows that are blank.
How can I get the template working with the attributes?
Screenshot attached of three blank rows: