Hi,
I am using infragistics webdropdowns in a GridView for ASP.NET web application. There are multiple webdropdowns in each row of GridView like 14 or 15 webdropdowns and there are 15 to 20 rows in GridView. Everything is fine with it but it took too long for page loading even after postback. Is it because of some javascript files that are loading each time for webdropdowns or something else?
Please suggest me how to reduce the loading time of page.
P.S: I am new in infragistics.
Thanks
Hello Usman,
Thank you for posting to our forum.
To assist you better I would like to know How many records do you have in WebDropDown?
As you are using Microsoft GridView I would recommend to use WebDataGrid and check the performance.
You can also use Lazy loading feature of WebDropDown which allows you to provide data to the WebDropDown control when the end-user tries to open the drop-down container or when they try to type into the value display. This feature greatly improves the performance of your application, especially when you have many WebDropDown controls on a page.
WebDropDown also supports load-on-demand. If load-on-demand is enabled, the end-user should first be able to see a scrollbar in the dropdown container, and if they scroll to the end of the list more items are fetched and appended at the bottom of the list through asynchronous callbacks. Enabling load-on-demand significantly reduces the bandwidth and processing overhead on both the server and the client.
WebDropDow supports a paging mechanism that helps to break a long list of items into multiple separate pages reducing load time and increasing performance.
Please let me know if you need further assistance.
Hi Divya,
Thanks for your precious time.There are barely 3 to 5 records in each WebDropDown.I tried to load GridView with empty WebDropDowns (with out binding data to WebDropDowns) but it still took so long to load GridView.
Thank you for the update.
I am not sure how microsoft GridView workes with WebDropDown, you can try using WebDataGrid instead of GridViws and check if it improves the performance.
If not please provide me a small isolated working sample of WebDataGrid with WebDropDown for further investigation of the issue.
I am sorry for late reply.I am trying to use WebDataGrid instead of GridView but now i am facing problems using WebDataGrid, as it shows error for Key:
Error: Key cannot be empty. The field objects in the grid must have non-empty unique keys assigned to the Key property.
My code is here:
<=================================================================================================>
<ig:WebDataGrid ID="gvJrSr" runat="server" Width="100%" AutoGenerateColumns="False" DataKeyFields="User_Id" OnInitializeRow="gvJrSr_RowDataBound" >
<Columns>
<ig:BoundDataField DataFieldName="User_Id" Key="User_Id" Header-Text="ID">
<Header CssClass="hide"/>
</ig:BoundDataField>
<ig:BoundDataField DataFieldName="UserName" Key="UserName" Header-Text="Teacher Name">
<ig:TemplateDataField>
<ItemTemplate>
<ig:WebDropDown runat="server" ID="ddl_Chkbox1" Width="100%" Button-HoverImageUrl = "../ig_res/Default/images/igdd_DropDownButton.png" Button-PressedImageUrl="../ig_res/Default/images/igdd_DropDownButton.png" EnableClosingDropDownOnSelect="false" EnablePaging="false" EnableAnimations="false" EnableCustomValues="false" DropDownContainerHeight="200px" DropDownContainerWidth="180px" EnableMultipleSelection="true" MultipleSelectionType="Checkbox">
</ig:WebDropDown>
</ItemTemplate>
</ig:TemplateDataField>
<ig:WebDropDown runat="server" ID="ddl_Chkbox2" Width="100%" Button-HoverImageUrl = "../ig_res/Default/images/igdd_DropDownButton.png" Button-PressedImageUrl="../ig_res/Default/images/igdd_DropDownButton.png" EnableClosingDropDownOnSelect="false" EnablePaging="false" EnableAnimations="false" EnableCustomValues="false" DropDownContainerHeight="200px" DropDownContainerWidth="180px" EnableMultipleSelection="true" MultipleSelectionType="Checkbox">
<ig:WebDropDown runat="server" ID="ddl_Chkbox3" Width="100%" Button-HoverImageUrl = "../ig_res/Default/images/igdd_DropDownButton.png" Button-PressedImageUrl="../ig_res/Default/images/igdd_DropDownButton.png" EnableClosingDropDownOnSelect="false" EnablePaging="false" EnableAnimations="false" EnableCustomValues="false" DropDownContainerHeight="200px" DropDownContainerWidth="180px" EnableMultipleSelection="true" MultipleSelectionType="Checkbox">
<ig:WebDropDown runat="server" ID="ddl_Chkbox4" Width="100%" Button-HoverImageUrl = "../ig_res/Default/images/igdd_DropDownButton.png" Button-PressedImageUrl="../ig_res/Default/images/igdd_DropDownButton.png" EnableClosingDropDownOnSelect="false" EnablePaging="false" EnableAnimations="false" EnableCustomValues="false" DropDownContainerHeight="200px" DropDownContainerWidth="180px" EnableMultipleSelection="true" MultipleSelectionType="Checkbox">
<ig:TemplateDataField Header-Text="Assign">
<asp:LinkButton ID="lnkBtnAssign1" CommandArgument='<%#Eval("User_Id")%>' runat="server" OnClick="lnkBtnAssignJrSr_Click" CssClass="linkbutton">Assign</asp:LinkButton>
<ig:TemplateDataField Header-Text="Print Report">
<asp:ImageButton ID="btnPrintJrSr" runat="server" ImageUrl="~/images/print_icon.png" CommandArgument='<%#Eval("User_Id") %>' OnClick="btnPrintJrSr_Click" CausesValidation="false" />
</Columns>
</ig:WebDataGrid>
P.S: I am binding TemplateDataField names and data dynamically in OnInitializeRow event.
Kindly let me know what is missing here.
I can see you are setting your User_Id data as the DataKeyField for your grid. The DataKeyField is like a primary key so the values for all entries need to be unique.
Additional for using dropDown in the WebDataGrid you can use DropDownProvider .WebDropDown can be used as an editor provider for WebDataGrid to show a drop-down list of items for cell values with all other WebDropDown features.
Please refer the following API document help to learn how to use WebDropDown as the DropDownProvider in WebDataGrid.:
www.infragistics.com/.../webdropdown-using-webdropdown-as-an-editor-provider-for-webdatagrid
And a sample application is here:
https://es.infragistics.com/samples/aspnet/data-grid/dropdown-editors
Thank you for your assistance.My problem is resolved now.