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

RadCombobox inside RadGrid freeze when type a letter

1 Answer 43 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
Orlando
Top achievements
Rank 1
Orlando asked on 03 Jul 2013, 11:30 PM
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.

1 Answer, 1 is accepted

Sort by
0
Nencho
Telerik team
answered on 08 Jul 2013, 02:34 PM
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.
Tags
ComboBox
Asked by
Orlando
Top achievements
Rank 1
Answers by
Nencho
Telerik team
Share this question
or