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

Loading data in blocks or alternative

2 Answers 70 Views
MultiSelect
This is a migrated thread and some comments may be shown as answers.
Ric
Top achievements
Rank 1
Ric asked on 21 Sep 2015, 08:32 AM

I have this multiselect on my asp.net mvc project

 

  <div class="demo-section user-selection">
      <h3 class="title">1. Select one or more Users</h3>
      @(Html.Kendo().MultiSelect()
.Name("customers")
.DataTextField("givenName")
 
    .DataValueField("description")
    //.Placeholder("No users selected")
    .Events(events => events.Change("NewSelection"))
 
    .DataSource(source =>
    {
        source.Read(read =>
        {
            read.Action("GetCustomers", "Home");
        });
    })
    .Height(300)
                    //.HtmlAttributes(new { style = "width: 400px" })
                    .HeaderTemplate("<div class=\"dropdown-header dropdown_Users\">" +
                          "<span class=\"k-widget k-header\">Photo</span>" +
                          "<span class=\"k-widget k-header\">Contact info</span>" +
                      "</div>")
                                                    .ItemTemplate("<span class=\"k-state-default item-user userPic\"><img class=\"userPhoto\" src=\"" + @System.Configuration.ConfigurationManager.AppSettings["BaseUrl"] + "user/image?userIid=#:data.IID#\" /></span>" +
                                                              "<span class=\"k-state-default item-user \"><h3>#: data.givenName # #: data.sn #</h3><p>#: data.description #</p></span>")
      )
  </div>

 

the data i load is of 2000 users that then appear in the multiselect list with their photo, first and last name and role.

my problem is that the loading takes about 5 or 6 seconds, and when scrolling down the list it sometimes gets a bit "clunky"
.

Is there anyway to improve the loading of data maybe making it load in blocks of 200 users at a time , or another way of improving performance?

2 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 23 Sep 2015, 03:26 PM
Hello,

You can use virtualization to improve the performance.

Regards,
Daniel
Telerik
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 Feedback Portal and vote to affect the priority of the items
0
Ric
Top achievements
Rank 1
answered on 24 Sep 2015, 02:28 PM
ah yes, it is much better now :)
thanks for the help
Tags
MultiSelect
Asked by
Ric
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Ric
Top achievements
Rank 1
Share this question
or