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

multiselect using checkbox - disable text select

6 Answers 338 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Megan Vee
Top achievements
Rank 1
Megan Vee asked on 30 Sep 2010, 09:41 AM
I have a RadComboBox that I populate with checkboxes and associated labels as follows:
<ItemTemplate>
     <div onclick="StopPropagation(event)">
          <asp:CheckBox ID="CheckBox1" runat="server" Checked="True" AutoPostBack="False" OnClick="checkboxClick(this)" Text = '<%# DataBinder.Eval(Container, "Text") %>' />
     </div>
</ItemTemplate>

The RadComboBox has a client event that updates the combobox text by looping thru the selected checkboxes and assigning a custom text.

If a user clicks to the right of the checkbox label, the label text is selected and inserted into the combobox, even though the checkbox is not checked/unchecked. The combobox client code does not overwrite this, for some reason.

How can I stop this from happening?

Please help!

Thank you, 
-Megan

see attached - on 2nd image, you can see that 1.5 stars is in the combo text, but it doesn't match the dropdown.

 

6 Answers, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 30 Sep 2010, 09:58 AM
Hi Megan Vee,

Please see the code of this demo, which does avoids this issue.

Sincerely yours,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Megan Vee
Top achievements
Rank 1
answered on 30 Sep 2010, 10:07 AM
Thank you for the quick reply, Simon.

The funny thing is, I can reproduce the problem in the linked demo.

Try clicking on the 'white space' after the word Cabrio.
(it may take a couple of tried, because you have to hit it 'just right', but my users are really good at hitting the spot)

Cabrio is entered into the text, but not selected...

-Megan
0
Simon
Telerik team
answered on 30 Sep 2010, 02:43 PM
Hello Megan Vee,

Indeed clicking next to the Label selects the Item. I failed to understand that you are experiencing the same issue when reading your first post (although you have clearly stated it as I see now), so please excuse me.

This is something we will show how to fix in a Code Library Project we are currently working on. The idea is to check/uncheck the checkbox when the user clicks on the 'white area' next to the label and stop the propagation of the event. I will post the solution in this forum thread once we are ready.

Regards,
Simon
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
0
Megan Vee
Top achievements
Rank 1
answered on 30 Sep 2010, 03:12 PM
Thank you, Simon. I will patiently look forward to the code project.
-Megan
0
Thad
Top achievements
Rank 2
answered on 12 Nov 2010, 04:24 AM
Our users are also very adept at clicking "that spot"...  I also look forward to this solution!

Thad
0
Ivana
Telerik team
answered on 31 Jan 2012, 04:32 PM
Hi Megan,

Our online demo is already fixed. You could use the following link (which will be available later this week) to follow the changes:
(http://demos.telerik.com/aspnet-ajax-beta/combobox/examples/functionality/templates/defaultcs.aspx).
(Till then, it will redirect you to the official demos website.)

Thanks for your patience.

Kind regards,
Ivana
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now
Tags
ComboBox
Asked by
Megan Vee
Top achievements
Rank 1
Answers by
Simon
Telerik team
Megan Vee
Top achievements
Rank 1
Thad
Top achievements
Rank 2
Ivana
Telerik team
Share this question
or