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

Combo Box CheckedItems Text problem

2 Answers 139 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Amjad
Top achievements
Rank 1
Amjad asked on 09 Feb 2012, 12:15 PM

Dears;

am having an issue on the combobox checkbox property;

the control syntax is:

<rad:RadComboBox ID="lstCustomrs" runat="server" Width="300px" CheckBoxes="true"
 
 EnableCheckAllItemsCheckBox="true" Localization-AllItemsCheckedString="All Customers"
EmptyMessage="Select Customer">
 
</rad:RadComboBox>

All Items are checked by default:

Private Sub lstCustomers_ItemDataBound(sender As Object, e As Telerik.Web.UI.RadComboBoxItemEventArgs) Handles lstCustoemrss.ItemDataBound
 
    e.Item.Checked = True
 
End Sub

The Scenario is:

  1. when i enter my page all items are checked by default
  2. then when i uncheck "check all" check box then choose a single item.
  3. then i go out of the control
  4. then i check anther checkbox item the checkbox items text still show the last single item that i have choosed.

Can you please advise



2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 10 Feb 2012, 06:27 AM
Hello,

Try the following javascript.
JS:
<script type="text/javascript">
 function OnClientItemChecking(sender, args)
  {
   sender.get_checkedItems()[0].set_checked(false);
  }
</script>

Thanks,
Princy.
0
Amjad
Top achievements
Rank 1
answered on 11 Feb 2012, 11:30 AM
Thanks Princy but this not what i was asking for

when i check multiple items then check one item then anther item the display text shows that you have choosed one item instead of comma separated multiple item i dont know if this is a bug in the control or what ?

thanks
Tags
ComboBox
Asked by
Amjad
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Amjad
Top achievements
Rank 1
Share this question
or