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

Radcombobox checkboxes selectedindexchanged not firing on the first item

13 Answers 807 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Paul Yerre
Top achievements
Rank 1
Paul Yerre asked on 14 Sep 2011, 02:45 AM

Requirements

RadControls version
.NET version
Visual Studio version
programming language
browser support

all browsers supported by RadControls


PROJECT DESCRIPTION
[enter description here, together with step-by-step instructions on how to use the project]

I have a radcombobox with checkboxes set to True. When I select the first item only, the selectedindexchanged event isn't triggerred. Its only fired when i select on the second item. Does anyone know where the problem is?
<telerik:RadComboBox ID="RadComboBox1" runat="server" AutoPostBack="true" SelectionMode="Multiple" CheckBoxes="true">
    <Items>
        <telerik:RadComboBoxItem Text="abc1" Value="1" Selected="false"/>
        <telerik:RadComboBoxItem Text="abc2" Value="2" Selected="false"/>
        <telerik:RadComboBoxItem Text="abc3" Value="3" Selected="false"/>
    </Items>
    </telerik:RadComboBox>

13 Answers, 1 is accepted

Sort by
0
Dimitar Terziev
Telerik team
answered on 19 Sep 2011, 09:28 AM
Hi Paul,

When you have CheckBoxes enabled the SelectedIndexChanged should not be fired since the item's selection is disabled.  You could use the OnItemChecked event which is fired when an item is checked.

All the best,
Dimitar Terziev
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal
0
Joel R
Top achievements
Rank 1
answered on 04 Oct 2011, 10:13 PM
In the previous version (2011.2.712.35) the selectionChanged event was called after clicking on an area outside the combobox.  The advantage is that you can act on all the check changes made at one time. In the new version (2011.2.915.35) I am forced to act on each item checked in the new event.  It would be really nice to have the option to act on one check at a time or after the user finishes all checks and moves on.

I am now forced to change my code to account for the Telerik version change :(
0
Dimitar Terziev
Telerik team
answered on 05 Oct 2011, 03:02 PM
Hi Joel R,

With the current implementation of the Check Boxes the SelectedIndexChanged event should not be fired at all. The reason for this behavior is the fact that when you are using check boxes you are not selecting items, but checking and it's expected that only event related with the check action should be fired. The selection of items when check boxes are enabled should be considered in the terms of checking and not actual selecting.

Greetings,
Dimitar Terziev
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
0
Craig
Top achievements
Rank 1
answered on 08 May 2013, 12:41 PM
I've just had to fix a bug in our solution which basically boiled down to be exactly this - though I realized before finding this thread what seemed to be going on.

Just want to add my voice to Joel's, this seems like a bit of a sidestep really... sure its good to be able to handle each individual ItemChecked event but a lot of our clients have rather bandwidth sensitive connections and the place I've just had to fix this the combo was being used to select filtering options for a grid which refreshes after each search criteria has been modified (not what I'd do by choice but customers.... go fig). Of course NOW its refreshing on every single item being checked or unchecked in this combo which is probably going to incur yet another change of requirements.

So yes, good to have progress which this definitely is.... but if we could get the ability to handle the changed checks in one batch after the control looses focus that would be forward progress.... instead of this slightly forward but mostly to the side progress...

You know.... i want my cake and to eat it, I'm greedy like that.

Thanks anyway.

EDIT: Sorry, just realised how old this thread is.
0
Dimitar Terziev
Telerik team
answered on 13 May 2013, 07:00 AM
Hi Craig,

Thank you for your feedback on the matter. As for the batch "check" operation, you could use the server TextChanged event which is fired when the text in the input is changed. Since this event should be handled only when all items are check/unchecked  you could use the client OnClientTextChange event and cancel it when it's not necessary to fire the server one(meaning that all items are not checked/unchecked).

Kind regards,
Dimitar Terziev
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.
0
MRa
Top achievements
Rank 1
answered on 27 Aug 2013, 03:58 PM
Hi Dimitar,

I have version 2013.2.717.40 of the Radcombobox and the properties look like these:
CheckBoxes="True"
EnableCheckAllItemsCheckBox="True"
DataTextField="DEPARTMENT"
DataValueField="DEPARTMENT"
Width="300px"
MaxHeight="600px"
AutoPostBack="True"
CheckedItemsTexts="DisplayAllInInput"

Per your previous suggestion, i have changed the SelectedIndexChanged event for TextChanged but i'm still having a similar issue: When i select the first item (Ex: Sales) the TextChanged event triggers fine but when i uncheck Sales, the autopostback refreshes the page but the event is never triggered. This ONLY happens when the FIRST item is unchecked, when any of the other items are unchecked, the event triggers fine.

Any suggestions?
0
Dimitar Terziev
Telerik team
answered on 29 Aug 2013, 11:57 AM
Hi,

I've made a test using the provided configuration of the RadComboBox and indeed there is an issue with the TextChange event, which as pointed in your post, does not fire when the first item is unchecked. Further testing this issue, I have noticed that this behavior is reproduced only when the RadComboBoxItem has value set as well as text. In your particular scenario one and the same information is being bound to the Text and the Value properties of the RadComboBoxItem, so please try not to bind the Value property and use only the text and let me know whether the issue persists?

As a token of gratitude for this bug report your Telerik points are updated.

Regards,
Dimitar Terziev
Telerik
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 the blog feed now.
0
MRa
Top achievements
Rank 1
answered on 29 Aug 2013, 02:27 PM
What happens if i need the Text and Value fields to be 2 different things? Ex: DataTextField="DepartmentName" (Sales) DataValueField="Department_ID" (102)? I tested this out and i'm still having the same issue.

0
Dimitar Terziev
Telerik team
answered on 02 Sep 2013, 12:25 PM
Hello,

My suggestion was a temporary workaround until this bug is fixed.

Regards,
Dimitar Terziev
Telerik
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 the blog feed now.
0
Susan Hessler
Top achievements
Rank 1
answered on 24 Dec 2013, 12:35 AM
Has this been fixed yet?
0
Dimitar Terziev
Telerik team
answered on 27 Dec 2013, 08:06 AM
Hi,

This issue is still pending to be fixed.

Regards,
Dimitar Terziev
Telerik
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 the blog feed now.
0
Dipen
Top achievements
Rank 1
answered on 05 Feb 2015, 01:27 PM
I'm also facing the same issue. So is this issue fixed? And if yes, then in which telerik control version?
0
Dimitar Terziev
Telerik team
answered on 10 Feb 2015, 03:37 PM
Hi,

We have made a lot of bug fixes in the latest official service pack, so you could download and test it.

Regards,
Dimitar Terziev
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.

 
Tags
ComboBox
Asked by
Paul Yerre
Top achievements
Rank 1
Answers by
Dimitar Terziev
Telerik team
Joel R
Top achievements
Rank 1
Craig
Top achievements
Rank 1
MRa
Top achievements
Rank 1
Susan Hessler
Top achievements
Rank 1
Dipen
Top achievements
Rank 1
Share this question
or