I know how to load a new item into a radCombobox, but how do you do it for a multi-column combobox? This is my code for the combobox:
VB code for radCBOLookup_ItemDataBound:
Currently, the only way I have been able to figure this out is to add a new datarow to the datasource. Does anyone have any suggestions?
<%@ Control Language="vb" AutoEventWireup="false" CodeBehind="radCBOLookup.ascx.vb"
Inherits="HEW.radCBOLookup" %>
<
telerik:RadComboBox
ID
=
"radCBOLookup"
runat
=
"server"
MarkFirstMatch
=
"true"
AllowCustomText
=
"false"
Width
=
"50px"
DropDownWidth
=
"350px"
MaxHeight
=
"300px"
NoWrap
=
"true"
HighlightTemplatedItems
=
"true"
ExpandDirection
=
"Down"
ExpandDelay
=
"0"
CollapseDelay
=
"0"
>
<
HeaderTemplate
>
<
table
style
=
"width: 100%; text-align: left; font-size: 8pt"
>
<
tr
>
<
td
style
=
"width: 20%;"
>
Code
</
td
>
<
td
style
=
"width: 80%;"
>
Description
</
td
>
</
tr
>
</
table
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
table
style
=
"width: 100%; text-align: left; font-size: 8pt"
>
<
tr
>
<
td
style
=
"width: 20%;"
>
<%#DataBinder.Eval(Container.DataItem, "Master_Type_Code")%>
</
td
>
<
td
style
=
"width: 80%;"
>
<%#DataBinder.Eval(Container.DataItem, "Master_Desc")%>
</
td
>
</
tr
>
</
table
>
</
ItemTemplate
>
</
telerik:RadComboBox
>
VB code for radCBOLookup_ItemDataBound:
e.Item.Text = (DirectCast(e.Item.DataItem, DataRowView))("Master_Type_Code").ToString
e.Item.Value = (DirectCast(e.Item.DataItem, DataRowView))("Master_Type_Code").ToString.Trim
e.Item.Attributes("Description") = (DirectCast(e.Item.DataItem, DataRowView))("Master_Desc").ToString.Trim
Currently, the only way I have been able to figure this out is to add a new datarow to the datasource. Does anyone have any suggestions?