Hello,
I need a help to display checkbox in proper format using item template.
My scenorio is to select mutiple rows from mutilpe column combo and display the count of selected rows either in Footer or displaying a alert box( using OnClientDropDownClosing) after selecting the items .If I use builtin Checkbox (CheckBoxes="true" ) ,I am able to get the count in alert box but I am not able to format the content(mutilple coulmn) properly(Checkbox and Item Template contents are coming in different rows) . In order to format the content I am using Checkbox control in Item Template but not able to get the count using the code given in Telerik site for OnClientDropDownClosing. My code is as below.
Please provide me solution for either of the below 2 isuues:
- If we use Checkbox control in Item Template,how to get the count?
- If we use builtin checkbox,how to format the Item Template and Header Template?
Thanks in Advance!
I need a help to display checkbox in proper format using item template.
My scenorio is to select mutiple rows from mutilpe column combo and display the count of selected rows either in Footer or displaying a alert box( using OnClientDropDownClosing) after selecting the items .If I use builtin Checkbox (CheckBoxes="true" ) ,I am able to get the count in alert box but I am not able to format the content(mutilple coulmn) properly(Checkbox and Item Template contents are coming in different rows) . In order to format the content I am using Checkbox control in Item Template but not able to get the count using the code given in Telerik site for OnClientDropDownClosing. My code is as below.
<
telerik:RadComboBox
ID
=
"rcbPorts"
runat
=
"server"
EnableLoadOnDemand
=
"true"
HighlightTemplatedItems
=
"true"
OnClientItemsRequested
=
"UpdateItemCountField"
OnClientDropDownClosing
OnDataBound
=
"rcbPorts_DataBound"
OnItemDataBound
=
"rcbPorts_ItemDataBound"
MarkFirstMatch
=
"true"
EmptyMessage
=
"Select Ports"
AutoPostBack
=
"true"
Width
=
"500px"
DataTextField
=
"PortName"
DataValueField
=
"PortCode"
>
<
HeaderTemplate
>
<
ul
>
<
li
class
=
"col1"
>Select</
li
>
<
li
class
=
"col2"
>Country Name</
li
>
<
li
class
=
"col3"
>Port Name</
li
>
<
li
class
=
"col4"
>Port Type</
li
>
</
ul
>
</
HeaderTemplate
>
<
ItemTemplate
>
<
ul
>
<
li
class
=
"col1"
>
<
asp:CheckBox
runat
=
"server"
ID
=
"chkport"
Text
=
""
onclick
=
"stopPropagation(event);"
/>
</
li
>
<
li
class
=
"col2"
>
<%# DataBinder.Eval(Container.DataItem, "PCountryName")%></
li
>
<
li
class
=
"col3"
>
<%# DataBinder.Eval(Container.DataItem, "PortName")%></
li
>
<
li
class
=
"col4"
>
<%# DataBinder.Eval(Container.DataItem, "PortType")%></
li
>
</
ul
>
</
ItemTemplate
>
<
FooterTemplate
>
A total of
<
asp:Literal
runat
=
"server"
ID
=
"RadComboItemsCount"
/>
items
</
FooterTemplate
>
</
telerik:RadComboBox
>
Please provide me solution for either of the below 2 isuues:
- If we use Checkbox control in Item Template,how to get the count?
- If we use builtin checkbox,how to format the Item Template and Header Template?
Thanks in Advance!