My Combobox has an ItemTemplate consisting of a label and 2 Radbuttons (Checkbox Toggletype) on each row. The combox is loaded using a Datatable for now. Everything works fine, except that when a user clicks on a Row instead of in an ectual checkbox, the dropdown closes gracefully but now says System.Data.DataRowView instead of EmptyMessage="- Select -"
Protected
Sub
Page_Load(
ByVal
sender
As
Object
,
ByVal
e
As
System.EventArgs)
Handles
Me
.Load
If
Not
Page.IsPostBack
Then
DisplayPrintOptions.DataSource = GetPrintDisplayProfile()
DisplayPrintOptions.DataBind()
end if
Private
Function
GetPrintDisplayProfile()
As
DataTable
'Get users Preferred Layout
Dim
dt
As
New
DataTable()
dt.Columns.Add(
New
DataColumn(
"ColumnDisplayName"
,
GetType
(
String
)))
dt.Columns.Add(
New
DataColumn(
"Column"
,
GetType
(
String
)))
dt.Columns.Add(
New
DataColumn(
"Display"
,
GetType
(
Boolean
)))
dt.Columns.Add(
New
DataColumn(
"Print"
,
GetType
(
Boolean
)))
etc..
<
telerik:RadComboBox
ID
=
"DisplayPrintOptions"
runat
=
"server"
HighlightTemplatedItems
=
"true"
Width
=
"100px"
AutoPostBack
=
"false"
Label
=
"Display & Print Options:"
LabelCssClass
=
"DisplayPrint-label"
DropDownWidth
=
"400"
EmptyMessage
=
"- Select -"
>
<
HeaderTemplate
>
<
div
style
=
"width:305px;height:15px;"
>
<
div
style
=
"display:block;float:right;color: rgb(0, 21, 110) !important;"
>
Show in
</
div
>
</
div
>
<
div
style
=
"width:350px;"
>
<
div
style
=
"width:210px;float:left;padding:0 11px 0 11px;color: rgb(0, 21, 110) !important;"
>
Name of Column
</
div
>
<
div
style
=
"width:50px;float:right;margin-right:5px;color: rgb(0, 21, 110) !important;"
>
Report
</
div
>
<
div
style
=
"width:40px;float:right;color: rgb(0, 21, 110) !important;"
>
Grid
</
div
>
</
div
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
id
=
"DisplayPrint"
>
<
li
>
<!-- Row -->
<
ul
>
<
li
id
=
"col1"
><%# Eval("ColumnDisplayName")%></
li
>
<
li
id
=
"col3"
>
<
telerik:RadButton
ID
=
"ColReports"
runat
=
"server"
ButtonType
=
"ToggleButton"
ToggleType
=
"CheckBox"
Checked='<%# DataBinder.Eval(Container.DataItem, "Display").ToString()%>' AutoPostBack="false"
CommandName='<%# DataBinder.Eval(Container.DataItem, "Column").ToString()%>'>
</
telerik:RadButton
>
</
li
>
<
li
id
=
"col2"
>
<
telerik:RadButton
ID
=
"ColGrid"
runat
=
"server"
ButtonType
=
"ToggleButton"
ToggleType
=
"CheckBox"
Checked='<%# DataBinder.Eval(Container.DataItem, "Print").ToString()%>' AutoPostBack="false"
CommandName='<%# DataBinder.Eval(Container.DataItem, "Column").ToString()%>'>
</
telerik:RadButton
>
</
li
>
</
ul
>
</
li
>
<!-- End of row -->
</
ul
>
</
ItemTemplate
>
<
FooterTemplate
>
<
div
style
=
"float:right;"
><
telerik:RadButton
ID
=
"SubmitColumns"
runat
=
"server"
Text
=
"Submit"
CausesValidation
=
"false"
OnClick
=
"BuildGridColumns"
/></
div
>
</
FooterTemplate
>
</
telerik:RadComboBox
>