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

RadMultiSelect SelectionChanged not triggered every time

1 Answer 218 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Igor
Top achievements
Rank 1
Igor asked on 06 Apr 2020, 09:11 AM
Hello,

If you select an item in RadMultiSelect, all server events works (OnSelectionChanged, OnItemSelected). If you deselect the same item, the events are not triggered (OnSelectionChanged, OnItemDeselected).
Then If you select the item again, it is triggered again.
Same works with deselecting. If you start with deselecting the item, events are triggered, if you select it again, they are not.
My RadMultiSelect is bound to RadAjaxManagerProxy, the events are noticed, there is loading animation for a while, but triggers are not working.

You can replicate this bug on your demo here:
https://demos.telerik.com/aspnet-ajax/multiselect/serversideevents/defaultcs.aspx

1 Answer, 1 is accepted

Sort by
0
Peter Milchev
Telerik team
answered on 09 Apr 2020, 07:42 AM

Hello Igor,

Indeed, the issue is observed in the online demo but it is due to a misconfiguration of the RadAjaxManager.

To fix it, the MultiSelect should not only update the EventConsole but itself as well.

<telerik:RadAjaxManager runat="server" ID="RadAjaxManager1">
    <AjaxSettings>
        <telerik:AjaxSetting AjaxControlID="RadMultiSelect1">
            <UpdatedControls>
                <telerik:AjaxUpdatedControl ControlID="RadMultiSelect1" />
                <telerik:AjaxUpdatedControl ControlID="EventLogConsole1" />
            </UpdatedControls>
        </telerik:AjaxSetting>
    </AjaxSettings>
</telerik:RadAjaxManager>

If this row is not added, then the MultiSelect is not updated after the postback, so the non-updated data will be sent to the server on the next postback.

Thank you for bringing this to our attention, we will fix the demo shortly.

Regards,
Peter Milchev
Progress Telerik

Progress is here for your business, like always. Read more about the measures we are taking to ensure business continuity and help fight the COVID-19 pandemic.
Our thoughts here at Progress are with those affected by the outbreak.
Tee
Top achievements
Rank 1
commented on 29 Sep 2021, 10:02 PM

Hello,

I'm having similar issue with RadMultiSelect control not refreshing.   In my Webform (ASP.NET 4.0), I have  RadMultiSelect1,  and RadMultiSelect2.  RadMultiSelect1 drives RadMultiSelect2.  For example:  RadMultiSelect1 shows Locations, and RadMultSelect2 shows employees from a selected location.   

1. Upon loading,  RadMultiSelect1 defaulted to CA,  and RadMultiSelect2 will list All Employees from  CA.   I pick Employee 1 - Smith.  

2. Then I change the Location (RadMultiSelect1) to AZ,  I expect Employee 1 - Smith gets removed from the Employee List (RadMultiSelect2), but Employee 1 - Smith is still showing.  I have tried to assign and emptied object to the Employee List (RadMultiSelect2) but don't see any changes.

        RadMultiSelect2.Value = new object[] { };

3. I have my AJAX set up as followed: 

   <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
      <AjaxSettings>

         <telerik:AjaxSetting AjaxControlID="RadMultiSelect1">
              <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="RadMultiSelect1" />
                  <telerik:AjaxUpdatedControl ControlID="RadMultiSelect2" />
              </UpdatedControls>
          </telerik:AjaxSetting>

         <telerik:AjaxSetting AjaxControlID="RadMultiSelect2">
              <UpdatedControls>
                  <telerik:AjaxUpdatedControl ControlID="RadMultiSelect2" />
              </UpdatedControls>
          </telerik:AjaxSetting>

       </AjaxSettings>
   </telerik:RadAjaxManager>
   <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" InitialDelayTime="1000">
       <asp:Image ID="Image1" runat="server" ImageUrl="~/Images/Loading.gif" AlternateText="Loading..." />
   </telerik:RadAjaxLoadingPanel>

4.  I tried to add the EvenLogConsole1 <telerik:AjaxUpdatedControl ControlID="EventLogConsole1" />but I got The type or namespace name 'QuickStart' does not exist in the namespace 'Telerik' (are you missing an assembly reference?)  Can you show me how to reference QuickStart?  

Thank you.

Peter Milchev
Telerik team
commented on 04 Oct 2021, 01:34 PM

Hi Tee, the EventLogConsole is a custom control and its source code is in the demos you can download. With that said, you do not need it in your real project. 

You can check how the MultiSelects would behave without the AjaxManager and see if there are any JavaScript errors in the browser's console:

Tee
Top achievements
Rank 1
commented on 05 Oct 2021, 05:33 PM | edited

Thank you Peter. 

The issue I have is the dataset in RadMultiSelect2 is too large and when I made a change in RadMultiSelect1,  the site stopped responding.  I am looking into the Virtualization.  I followed the instruction below to implement Virtualization for my WebForm but doesn't seem to work.  The control shows no data.   Please help.  

https://demos.telerik.com/aspnet-ajax/multiselect/virtualization/defaultcs.aspx

Thanks!

Tags
MultiSelect
Asked by
Igor
Top achievements
Rank 1
Answers by
Peter Milchev
Telerik team
Share this question
or