Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
52 views

Hi all,

I'm basically trying to create something similar to the demo presented here:

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

I've got a web service as a data source, and everything works (and looks) great without virtualization. I would obviously like to reap the benefits of virtualization, since the multiselect could potentially need to pull in a lot of data.

The issue occurs when I'm trying to select an item:

Telerik.Web.UI.WebRe…1f%3a619d6d01:13732 Uncaught TypeError: Cannot read properties of null (reading 'toJSON')
    at init.select (Telerik.Web.UI.WebRe…3a619d6d01:13732:38)
    at init.trigger (Telerik.Web.UI.WebRe…%3a619d6d01:5322:14)
    at init._select (Telerik.Web.UI.WebRe…%3a619d6d01:13489:7)
    at init._click (Telerik.Web.UI.WebRe…%3a619d6d01:13247:3)
    at init.d (Telerik.Web.UI.WebRe…a619d6d01:2435:3873)
    at init.trigger (Telerik.Web.UI.WebRe…%3a619d6d01:5322:14)
    at init._clickHandler (Telerik.Web.UI.WebRe…3a619d6d01:12931:54)
    at HTMLLIElement.d (Telerik.Web.UI.WebRe…a619d6d01:2435:3873)
    at HTMLUListElement.dispatch (Telerik.Web.UI.WebRe…619d6d01:2436:12445)
    at r.handle (Telerik.Web.UI.WebRe…a619d6d01:2436:9174)

Also, if I try to hook onto the OnSelect client-side event, it seems that the data item is not populated - my function onSelect(sender, args) gets triggered, but args.get_dataItem() returns null. Is it possible some binding didn't go as planned? Is there an extra step that needs to be done when using virtualization, or does perhaps some additional data need to be returned from the web service?

My VirtualSettings look like this:

<VirtualSettings ItemHeight="25" MapValueTo="dataItem" ValueMapper="valueMapper" />

and the ValueMapper isn't to blame because it's not getting triggered; I'm doing a simple scenario where there are no initially selected values to display.

I've tried going through docs for both RadMultiSelect and the Kendo control it wraps, but to no avail. I was initially using a version released in 2022, but have tried just replacing it with 2023.3.1010 - it didn't seem to help. I've also tried explicitly adding the  Virtual="true" option to my RadMultiSelect instance, but that seemed to have no effect either.

Thanks in advance,

Marko

Edit: I've also found the unanswered question regarding the same topic here:
https://www.telerik.com/forums/radmultiselect#1557910

I can't confirm whether the demo works, since it looks like the data source doesn't fetch any data:

Locally, if I basically copy/paste it and implement the web service, without virtualization everything works, when I add the VirtualSettings node, I'm getting the aforementioned error (probably caused by the fact that dateitem is actually null). I've also tried binding initial values, and they get displayed properly in the multiselect and can be deselected without issues.
branko
Top achievements
Rank 1
Iron
 answered on 15 Nov 2023
0 answers
70 views

Hi Team,
I tried following steps to use RadMultiSelect dropdown in my project but getting compile time error . 
1) I have registered Telerik.Web.UI assembly in aspx page
2) Added RadScriptManager and RadSkinManager on aspx page.
3) then added following code - 
<telerik:RadMultiSelect runat="server" DataValueField="text" Filter="Contains" EnforceMinLength="false" Placeholder="Select Receiptees"
    DataTextField="text" Width="500px" ID="requiredMultiSelect">
<Items>
<telerik:MultiSelectItem Text="Steven White"></telerik:MultiSelectItem>
<telerik:MultiSelectItem Text="Nancy King"></telerik:MultiSelectItem>
</Items>
</telerik:RadMultiSelect>   
4) added this line in aspx.vb file for default selection
requiredMultiSelect.Value = {"Anne King", "Andrew Fuller"}

And getting compile time error -
Type 'Global.Telerik.Web.UI.RadMultiSelect' is not defined.

Not able to find solution for this on telerik webpage also , Can anyone please help me with this?

  

0 answers
68 views

 

The RadMultiSelect implementation has one error that WCAG 4.1.1 parsing is catching. There is a duplicate span with the same id.

Found in the page source of the demo page (similar to how I implemented as well):

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

<select name="ctl00$ContentPlaceholder1$RadMultiSelect1" multiple="" id="ctl00_ContentPlaceholder1_RadMultiSelect1" class="RadMultiSelect RadMultiSelect_Silk" style="width:400px;">
<span id="ctl00_ContentPlaceholder1_RadMultiSelect1_WebServiceCDS" style="display:none;"></span><input id="ctl00_ContentPlaceholder1_RadMultiSelect1_ClientState" name="ctl00_ContentPlaceholder1_RadMultiSelect1_ClientState" type="hidden" />
</select><span id='ctl00_ContentPlaceholder1_RadMultiSelect1_WebServiceCDS' style='display:none'></span>

Hudson
Top achievements
Rank 1
 asked on 23 Aug 2023
1 answer
33 views

Hi Telerik team,

the "Contrast Security" tool we use shows us a "Untrusted Deserialization" Vulnerability found on one of the ASPX (webForms) page where we utilize RadMultiSelect control. (Our current version is 2021.1.119.45). 

Could you please suggest any options now to fix it, please?  

Details:

Tracked the following data from "ctl00_Main_content_ddlMSelectMultipleStaff_ClientState...:

POST /vosnet/communications/scheduler/default.aspx

ctl00_Main_content_ddlMSelectMultipleStaff_ClientState={"enabled":true,"selectedItems":[],"deselectedItems":[],"value":[2613],"selectedDataItems":[{"text":"Skaggs","value":"2613","Lastname":"Skaggs","Userid":2613,"attributes":{"FullName":"Skaggs Kari","Color":"background-color:rgb(89,20,195);","ColorARGB":"5838019"}}]}&ctl00$textsize=.......SNIP...........

...which was accessed within the following code:
Telerik.Web.UI.RadMultiSelect.LoadPostData()

...and ended up being deserialized with code that looks like this:
m = serializer.Deserialize<M>("{"enabled":true,"selectedItems":[],"deselectedI...")

 

Konstantin
Top achievements
Rank 1
Iron
 updated answer on 22 Aug 2023
1 answer
62 views

I'm using a Rad MultiSelect to search for people, and I would like to include a link to the selected person's profile page within the item template.  I noticed that when I use a RadButton, I don't see it on the page.  When I use the <a OnClick> I see the hyperlink but I can't hit the controller action.  

Is it possible that I just can't use a RadButton in the MultiSelect Item Template?


<ItemTemplate> <span class="k-state-default"> <p>#: data.Foo#</p> <a OnClick="detailsViewClick" runat="server" ID="Bar">View Details</a> <%-- Commented out because this does not even show up on the view <telerik:RadButton RenderMode="Lightweight" ID="Bar" runat="server" Text="ViewDetails" OnClick="detailsViewClick" > </telerik:RadButton>--%>

</span> </ItemTemplate>


Rumen
Telerik team
 answered on 26 Jun 2023
0 answers
108 views

I am getting the following error when using RadMultiSelect with over 13000 records:

Error InnerException Message: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.
 Error InnerException StackTrace:    at System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat)
   at Telerik.Web.UI.AdvancedJavaScriptSerializer.Serialize(Object obj)
   at Telerik.Web.UI.RadMultiSelect.DescribeItems(IScriptDescriptor descriptor)
   at Telerik.Web.UI.RadMultiSelect.DescribeComponent(IScriptDescriptor descriptor)
   at Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(Control control)
   at Telerik.Web.UI.RadDataBoundControl.GetScriptDescriptors()
   at System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl)
   at Telerik.Web.UI.RadDataBoundControl.RegisterScriptDescriptors()
   at Telerik.Web.UI.RadDataBoundControl.Render(HtmlTextWriter writer)
   at Telerik.Web.UI.RadMultiSelect.Render(HtmlTextWriter writer)
   at System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter)

I already have <jsonSerialization maxJsonLength="2147483647"> in my web.config but still errors out.

Telerik.Web.UI Version: 2022.2.622.45

Seems similar to this issue: https://www.telerik.com/forums/maxjsonlength-exceeded-in-radmap

But updating to higher version than 2020 didn't seem to solve it. Was the fix only for RadMap?

Hudson
Top achievements
Rank 1
 asked on 05 Jun 2023
1 answer
87 views

I'm trying to add ToolTip content dynamically with items selected/unselected from the Multiselect control.  The code seems to work with no errors. However, the tooltip doesn't show on mouse over the Multiselect control. 

I also attempted to add an mouseover client attribute event on the Multiselect as well.

Code snippets attached. 

 

Thank you for any help with this issue!

 

 

 

 
Doncho
Telerik team
 answered on 11 Oct 2022
1 answer
60 views

Hi,

01.   Assign the values to MultiSelect control as follows.

// Assign the Values array to MultiSelect
    kendoMultiSelect.value(allValues);

After assigning values, its scroll to the last item as below picture.

                                  

I need to navigate it to the first item in the list.

02.   When I try to expand the multiselect control first time it get close and second click it expanded.  I have set AutoClose=False.

 

Can anyone help me resolve these two issues.

 

Thank You,

Regards,

Chandi

Peter Milchev
Telerik team
 answered on 28 Mar 2022
0 answers
126 views

Hello,

I have multi select combo box which shows countries. I want to show states of countries in that same drop down only if that country is selected. See example below. Only if USA is selected in the multi select drop down, then only show states under USA as multi select drop down. Likewise for other countries in the drop down too. Is this something achievable?

USA

USA-Arizona

USA-California

USA-Texas

MEXICO

Mexico-Tijuana

Mexico-Hidalfgo

Joe
Top achievements
Rank 1
 asked on 24 Mar 2022
0 answers
120 views

Hi,

I am trying to explore the below mentioned demo of multiselect with virtualization on my local machine, as per the demo i have created all the required html, script and web service.

It is showing me the result from the web service but when i try to select an item it is throwing the error. I have attached the error screenshot.

Can you please help me understand the issue.

 

Demo URL - https://demos.telerik.com/aspnet-ajax/multiselect/virtualization/defaultcs.aspx?_ga=2.211857303.2029322217.1647423137-1941866349.1635312360

 

Error Screenshot -

Himanshu
Top achievements
Rank 1
 asked on 16 Mar 2022
Narrow your results
Selected tags
Tags
+? more
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Dominik
Top achievements
Rank 1
Giuliano
Top achievements
Rank 1
Dominic
Top achievements
Rank 1
Glendys
Top achievements
Rank 1
Iron
NoobMaster
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?