multiselect using checkbox - disable text select

7 posts, 0 answers
  1. Megan Vee
    Megan Vee avatar
    40 posts
    Member since:
    Mar 2010

    Posted 30 Sep 2010 Link to this post

    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.

     
  2. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 30 Sep 2010 Link to this post

    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
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Megan Vee
    Megan Vee avatar
    40 posts
    Member since:
    Mar 2010

    Posted 30 Sep 2010 Link to this post

    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
  5. Simon
    Admin
    Simon avatar
    2281 posts

    Posted 30 Sep 2010 Link to this post

    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
  6. Megan Vee
    Megan Vee avatar
    40 posts
    Member since:
    Mar 2010

    Posted 30 Sep 2010 Link to this post

    Thank you, Simon. I will patiently look forward to the code project.
    -Megan
  7. Thad
    Thad avatar
    106 posts
    Member since:
    Sep 2010

    Posted 11 Nov 2010 Link to this post

    Our users are also very adept at clicking "that spot"...  I also look forward to this solution!

    Thad
  8. Ivana
    Admin
    Ivana avatar
    657 posts

    Posted 31 Jan 2012 Link to this post

    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
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017