When I click save button, I couldn't get combobox checkeditems collection. My code is here;
<
telerik:RadComboBox
ID
=
"cmbNotificationUsers"
runat
=
"server"
CheckBoxes
=
"true"
EnableCheckAllItemsCheckBox
=
"true"
Width
=
"100%"
OnClientItemsRequesting
=
"OnClientItemsRequestingForUser"
EmptyMessage
=
"Select"
MarkFirstMatch
=
"true"
EnableLoadOnDemand
=
"true"
>
<
WebServiceSettings
Path
=
"../../WebServices/ControlObjects/ComboBoxes.asmx"
Method
=
"GetUsersByCompany"
/>
</
telerik:RadComboBox
>
foreach
(Telerik.Web.UI.RadComboBoxItem item
in
cmbNotificationUsers.CheckedItems)
{
messageUsers.Add(item.Value);
}
Thanks,
Gökhan
8 Answers, 1 is accepted
Since you are using the load on demand mechanism to populate the RadComboBox with data, the items of the RadComboBox are not persisted and therefore could not be accessed in code-behind.
For more information about this scenario you could refer to the following help articles on our website:
ComboBox items are not accessible on server-side when loading them on demand and Load On Demand Overview.
In addition, if you really need to implement the scenario in question, you can store the text and the value of the selected items in a hidden field as a value:text pair and then get the value of the hidden field on the server. To get the value and the text of a selected item you could subscribe to the OnClientItemChecked client-side event of the RadComboBox. Even in that case you will not have the real instance of the items but only its text and its value.
Greetings,
Ivana
the Telerik team

Sende galiba combobox ı doldururken onitemsrequested event ını kullandın ve chekbox daki seçili olan değerlerin valularını alamadın yani sendede checkeditems in count 0 geliyor bu sorunu nasıl bir yöntem ile hallettin

Thanks in Advance.
Could you please provide us with the implementation that you use at your end, so we could inspect it locally and try to pinpoint the problem for you?
Regards,
Nencho
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

1) OnClientCheckAllChecked doesnot work and if I select all , it picks the first value because of OnItem Checked.
2) What to do if I uncheck the item. or uncheck and check it again, as data is stored in hidden field.
If hidden field has data as "USA;Russia;Spain" .I uncheck Russia, then also hidden field will have same data.
And If I again check it , data will be "USA;Russia;Spain;Russia'
Can you tell me the controls that work with multiselect radcombobox which binded by web services
The issue that you experienced in the first of your questions is probably related with an unexpected behavior in such scenario. Using the Checkboxes along with the LoadOnDemand mechanism enabled is not a supported scenario, which is stated in the following documentation article:
http://www.telerik.com/help/aspnet-ajax/combobox-usability-checkboxes.html
As for your other question - generally, you can verify if the current operation on the item is check or uncheck and verify if the text of the item is contained in the value of the hidden field using indexof(). And regarding the current operation, you can remove it or add the Item's text.
Regards,
Nencho
Telerik
Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

I have an issue with marhfirstmatch="true" with CheckedItems radcombobox which binded by web services.
It is not working. How to resolve it ?

Hi!
I am still looking for a way to search items in Multi select radcombobox that has data binding with web services.
I tried Autocomplete and filtering too.
Autocomplete doesnot work.
Filtering works but every time when I retype to find another text, combobox get refreshed and not able to save earlier checked items.
Below is the code that I am using.
Thanks in Advance.
<asp:Panel ID="Pnl1" runat="server" Visible="false">
<telerik:RadComboBox ID="ddl1" CheckBoxes="true" runat="server" width="200" Height="150px" DropDownWidth="200"
EmptyMessage="Select" EnableLoadOnDemand="true" ShowMoreResultsBox="true"
AllowCustomText="true" Filter="Contains" EnableVirtualScrolling="true" Enabled="false"
OnClientItemsRequesting="OnClientItemsRequesting"
OnClientItemChecked = "OnClientItemChecked_Mul"
>
<WebServiceSettings Path="~/Services/Control.asmx" Method="GetListMultiple" />
</telerik:RadComboBox>
</asp:Panel>