RadCombobox inside RadGrid freeze when type a letter

2 posts, 0 answers
  1. Orlando
    Orlando avatar
    5 posts
    Member since:
    Jun 2011

    Posted 03 Jul 2013 Link to this post

    Hello, i have a radcombobox inside a radgrid, and the radcombobox is loaded with an objectdatasource, the items loading fast relatively(3000 items app) but when i put a letter in the radcombobox, the radcombobox freezes, and nothing work in the page for 40-60seconds... i think that is a problem in javascript ... there is my code

    <div>
     
                        <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server">
                        </telerik:RadAjaxLoadingPanel>
                        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
                            <telerik:RadGrid ID="rdgIntegrantes" runat="server" AutoGenerateColumns="False"
                                CellSpacing="0" GridLines="None" Width="700px"
                                AllowPaging="True" Culture="es-CL"
                                OnNeedDataSource="rdgPublicaciones_NeedDataSource" OnDeleteCommand="rdgIntegrantes_DeleteCommand"
                                OnInsertCommand="rdgIntegrantes_InsertCommand"
                                OnUpdateCommand="rdgIntegrantes_UpdateCommand" OnItemDataBound="rdgIntegrantes_ItemDataBound">
                                <MasterTableView AutoGenerateColumns="false" DataKeyNames="Id,TipoParticipacionId" ClientDataKeyNames="Id"
                                    CommandItemDisplay="Top" InsertItemPageIndexAction="ShowItemOnCurrentPage" EditMode="InPlace">
                                    <CommandItemSettings AddNewRecordText="Click para agregar nuevo profesor"></CommandItemSettings>
                                    <RowIndicatorColumn Visible="True" FilterControlAltText="Filter RowIndicator column">
                                    </RowIndicatorColumn>
                                    <ExpandCollapseColumn Visible="True" FilterControlAltText="Filter ExpandColumn column">
                                    </ExpandCollapseColumn>
                                    <Columns>
                                        <telerik:GridEditCommandColumn ButtonType="ImageButton">
                                        </telerik:GridEditCommandColumn>
                                        <telerik:GridButtonColumn ConfirmText="¿Desea desasociar este profesor?" ConfirmDialogType="RadWindow"
                                            ConfirmTitle="Eliminar profesor" ButtonType="ImageButton" CommandName="Delete" ConfirmDialogHeight="160px"
                                            ConfirmDialogWidth="250px">
                                        </telerik:GridButtonColumn>
                                        <telerik:GridTemplateColumn DataField="ProfesorId" HeaderText="Profesor" UniqueName="Profesor"
                                            ItemStyle-HorizontalAlign="Left">
                                            <ItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Text='<%#Bind("_NombreProfesor") %>'></asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <asp:Label ID="Label1" runat="server" Text='<%#Bind("_NombreProfesor") %>'></asp:Label>
                                            </EditItemTemplate>
                                            <InsertItemTemplate>
                                                <telerik:RadComboBox DataSourceID="OdsProfesor" Filter="Contains"
                                                    Width="300px" ID="rdCboProfesor"
                                                    DataTextField="_nombreCompleto"
                                                    DataValueField="_id"
                                                     
                                                    AllowCustomText="true" runat="server">
                                                </telerik:RadComboBox>
                                            </InsertItemTemplate>
                                        </telerik:GridTemplateColumn>
                                        <telerik:GridTemplateColumn DataField="TipoParticipacionId" HeaderText="Participación" UniqueName="Participacion"
                                            ItemStyle-HorizontalAlign="Left">
                                            <ItemTemplate>
                                                <asp:Label ID="Label2" runat="server" Text='<%#Bind("_nombreParticipacion") %>'></asp:Label>
                                            </ItemTemplate>
                                            <EditItemTemplate>
                                                <telerik:RadComboBox DataSourceID="OdsParticipacion" Filter="Contains" MarkFirstMatch="True"
                                                    Width="300px" ID="rdCboParticipacion" DataTextField="Nombre"
                                                    DataValueField="Id" runat="server">
                                                </telerik:RadComboBox>
                                            </EditItemTemplate>
                                            <InsertItemTemplate>
                                                <telerik:RadComboBox Filter="Contains" MarkFirstMatch="True" DataSourceID="OdsParticipacion"
                                                    Width="300px" ID="rdCboParticipacion" DataTextField="Nombre"
                                                    SelectedValue='<%#Bind("_NombreParticipacion") %>'
                                                    DataValueField="Id" AllowCustomText="true" runat="server">
                                                </telerik:RadComboBox>
                                            </InsertItemTemplate>
                                        </telerik:GridTemplateColumn>
     
                                    </Columns>
                                    <EditFormSettings>
                                        <EditColumn FilterControlAltText="Filter EditCommandColumn column">
                                        </EditColumn>
                                    </EditFormSettings>
                                </MasterTableView>
                                <FilterMenu EnableImageSprites="False">
                                </FilterMenu>
                            </telerik:RadGrid>
                        </telerik:RadAjaxPanel>
                    </div>
                    <asp:ObjectDataSource ID="OdsProfesor" runat="server" SelectMethod="GetProfesoresDropDownProjection" TypeName="OmegaEntityFramework.Core"></asp:ObjectDataSource>
                    <asp:ObjectDataSource ID="OdsParticipacion" runat="server" SelectMethod="GetPublicacionParticipaciones" TypeName="OmegaEntityFramework.Core"></asp:ObjectDataSource>MinFilterLength


    regards,
    Orlando.

  2. Nencho
    Admin
    Nencho avatar
    1457 posts

    Posted 08 Jul 2013 Link to this post

    Hello Orlando,

    When the Filter functionality of the RadComboBox is enabled, it iterates all of the loaded items at client-side, in order to match the results, regarding the set filter. When the control is populated with such large amount of data, it would be inevitably slow operation. In order to overcome the problematic behavior, I would suggest you to use the AutomaticLoadOnDemand mechanism. In addition, you could predefine the number of items, which could be loaded in portions(setting the ShowMoreResultsBox and ItemsPerRequest properties). Here you could find detailed information on the usage of the AutomaticLoadOnDemand.

    Regards,
    Nencho
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top