Hi,
I have a Listbox with sqldatasource
<telerik:RadListBox RenderMode="Lightweight" runat="server" ID="RadListBox2" OnInserted="RadListBox2_Inserted" DataSourceID="sds_items" OnItemDataBound="RadListBox2_ItemDataBound" DataTextField="NLdescription" DataValueField="Supplier" DataKeyField="id" Width="100%" AllowReorder="true"
AllowTransferDuplicates="true" Skin="Default">
<itemtemplate>
<div class="container border-bottom py-2">
<div class="font-weight-bold">Type: <%# DataBinder.Eval(Container, "Value")%></div>
<div class="font-weight-bold"><asp:TextBox ID="tb" Text='<%# DataBinder.Eval(Container, "Text")%>' runat="server"></asp:TextBox></div>
<label>Number:</label>
<span><%# DataBinder.Eval(Container, "Attributes['NLvar1']") %></span>
<label>Text:</label>
</div>
</itemtemplate>
</telerik:RadListBox>
And in Code Behind:
Protected Sub RadListBox2_ItemDataBound(sender As Object, e As RadListBoxItemEventArgs)
Dim drv As DataRowView = CType(e.Item.DataItem, DataRowView)
e.Item.Attributes.Add("NLvar1", drv("NLvar1").ToString())
End Sub
The Listbox is not showing any data for the NLvar1 attribute...what am I missing?
