This is a migrated thread and some comments may be shown as answers.

RadComboBox Issue with CheckBoxes and Filter enabled

2 Answers 175 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Subodh Gupta
Top achievements
Rank 2
Subodh Gupta asked on 26 Feb 2014, 02:30 PM
Hello All,
I whould like to share with u some trouble with using RadComboBox with CheckBoxes and Filter enabled. The problem is that after uncheck all items Combobox still show one item as checked. Version 
Here is my code:
<tr>
    <td class="adminTitle">Status</td>
    <td class="adminData">
        <telerik:RadComboBox EmptyMessage="Select Status" ID="ddlStatus" EnableCheckAllItemsCheckBox="true" Filter="Contains"
            CheckBoxes="true" runat="server" Width="298px" ToolTip="Select Status" />
    </td>
</tr>

Bind:
protected void Page_Load(object sender, EventArgs e)
{
    if (!IsPostBack)
    {                           
         ddlStatus.SetEnumDataSource<WfApprovalStatus>(exceptOrders.Cast<int>().ToList());
    }
}
Error appear only when I check ONE item. 
Steps to reproduce:
1. Open page
2. Check only ONE item in combobox
3. Click in empty space of page (this will close combobox window)
4. Try to uncheck item
5. One more time in empty space
6. You will see that looks like item still left checked but if u open combo box you will see that is not. If u try to send form to server 1 item will be checked

If you remove using filter all works good.

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 27 Feb 2014, 06:41 AM
Hi Subodh Gupta,

As a work around please try the following code snippet to achieve your scenario.

ASPX:
<telerik:RadComboBox EmptyMessage="Select Status" ID="ddlStatus" EnableCheckAllItemsCheckBox="true" Filter="Contains" CheckBoxes="true" runat="server" Width="298px" OnClientItemChecking="Uncheck" ToolTip="Select Status" />

JavaScript:
<script type="text/javascript">
    function Uncheck(sender, args) {
        if (args.get_item().get_checked() == true)
            sender.clearSelection();
    }
</script>

Thanks,
Shinu.
0
Juan Carlos
Top achievements
Rank 1
answered on 03 Jun 2016, 12:05 PM
Hello, 

Telerik said that checkboxes + filter is not supported but for me works perfectly if I add this propperty to radcombobox:

AllowCustomText = "true"

Regards.
Tags
ComboBox
Asked by
Subodh Gupta
Top achievements
Rank 2
Answers by
Shinu
Top achievements
Rank 2
Juan Carlos
Top achievements
Rank 1
Share this question
or