Hi ,
We are using infragistics in our asp.net application. We are using infragistincs WebDropDown control to load list of names to select. But the number of names we are binding are around 8200 . because of this much data WebDropDown is taking so much time(almost one whole minute) to prepare the controls after page loaded. After web page is loaded to make the control responsive it is taking one minutes. This is a very big problem . Please suggest us how to deal with this type of problem.
Thanks in advance,
Hi pkirankumar,
you can use several optiizations:
1) disable ASP.NET ViewState, EnableViewState=false
2) make sure AutoFiltering is not set to "Client". not sure which version you are using, but if you are using a more recent one, items objects will be lazy-loaded in that case, improving performance a lot
3) Enable load on demand, so from your 8200 items, only a number of them are loaded in the control initially (you can still filter, select, etc.)
Let me know if this helps. Thanks,
Angel
Thanks for fast response Angel,
We are using infragistics 10.2 version . I have tried with first two options but i could not see any improvement . So I tried with the third option then there is good improvement. But the problem is when i scroll down the new Items are not loading into drop down . Can you please suggestion me how can i fix this issue.
Following is the code i am using . Visual studio is 2008, infragistics version 10.2.
aspx page in form tag
<form id="form1" runat="server"> <asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <div> <ig:WebDropDown ID="WddEmployeeMSC" runat="server" Width="200px" DisplayMode="DropDownList" TextField="Name" ValueField="Id" EnableMultipleSelection="false" EnableViewState="false" EnableLoadOnDemand="true" LoadingItemsMessageText="Loading" EnableAutoFiltering="Server" > </ig:WebDropDown> <asp:Button ID="btnSubmit" Text="Submit" runat="server" OnClick="btnSubmit_Click" /> <asp:Button ID="btnPopulate" Text="PopulateData" runat="server" OnClick="btnPopulate_Click" /> </div> </form>
Following is the code behind and a class to create and bind generic list to webdropdown.
protected void btnSubmit_Click(object sender, EventArgs e) { var text = WddEmployeeMSC.SelectedValue; var value = WddEmployeeMSC.SelectedValue; } protected void btnPopulate_Click(object sender, EventArgs e) { List<NameList> NameList = new List<NameList>(); NameList name; for (int i = 1; i < 8500; i++) { name = new NameList() { Name = "Name" + i, Id = i }; NameList.Add(name); } WddEmployeeMSC.DataSource = NameList.ToList(); WddEmployeeMSC.ValueField = "Id"; WddEmployeeMSC.TextField = "Name"; WddEmployeeMSC.DataBind(); WddEmployeeMSC.Items.Insert(0, new DropDownItem("All", "All")); }
Following is the class
class NameList { public int Id { get; set; } public string Name { get; set; } }
Thanks in advance.
Hi Pkirankumar
you'll need to have the dataBinding logic on every postback (it will figure out which items to render )
Thanks angel.