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

Load panelbar

1 Answer 44 Views
PanelBar
This is a migrated thread and some comments may be shown as answers.
Silvia
Top achievements
Rank 1
Silvia asked on 28 Sep 2011, 11:00 PM
<telerik:RadPanelBar Height="400PX" runat="server" ID="RadPanelBar1" ExpandMode="FullExpandedItem" 
                    DataFieldID="Id" DataFieldParentID="Padre" DataSourceID="ObjectDataSource1" 
                    DataTextField="Nombre"  Skin="Windows7">
</telerik:RadPanelBar> 

<asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    SelectMethod="cargarMenu" TypeName="PL.Util.cliente">
</asp:ObjectDataSource>





public List<
cliente> cargarMenu()
        {
            List<cliente> misClientes = new List<cliente>();
 
            List<cms_spSeleccionarActivos_Result> resultadoActivos = listarActivos();
            List<cms_spSeleccionarInactivos_Result> resultadoInactivos = listarInactivos();
            cliente clienteActivo = new cliente(1, 0, "Activos");
            cliente clienteInactivo = new cliente(2, 0, "Inactivos");
            misClientes.Add(clienteActivo);
            misClientes.Add(clienteInactivo);
            foreach (cms_spSeleccionarActivos_Result item in resultadoActivos)
            {
                cliente miCliente = new cliente(item.cmr_id, Convert.ToInt32(item.ecm_id), item.cmr_nombre);
                 
                misClientes.Add(miCliente);
            }
 
 
            foreach (cms_spSeleccionarInactivos_Result item in resultadoInactivos)
            {
                cliente miCliente = new cliente(item.cmr_id, Convert.ToInt32(item.ecm_id), item.cmr_nombre);
                
                misClientes.Add(miCliente);
            }
            return misClientes;
        }
There's any way to load about 20,000 records into a RadPanelBar efficiently,my problem is that the application becomes very slow .


1 Answer, 1 is accepted

Sort by
0
Kate
Telerik team
answered on 03 Oct 2011, 11:12 AM
Hello Silvia,

In general the RadPanelBar as a navigation control is not designed to support such amount of items and the performance issue that you experience is expected. If you need to load 20 000 items I would suggest that you use either a RadTreeView or a RadCombobox with load on demand. You can place either of the controls in a Template of the RadPanelBar and load as many items as you need. Here you can see how you can achieve load on demand depending on the control that you choose as well as Templates of the RadPanelBar:

http://demos.telerik.com/aspnet-ajax/panelbar/examples/functionality/templates/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/treeview/examples/programming/loadondemandmodes/defaultcs.aspx
http://demos.telerik.com/aspnet-ajax/combobox/examples/populatingwithdata/autocompletesql/defaultcs.aspx

All the best,
Kate
the Telerik team
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 their blog feed now
Tags
PanelBar
Asked by
Silvia
Top achievements
Rank 1
Answers by
Kate
Telerik team
Share this question
or