ColumnTree doesn't exist in Ext.Net 2

  1. #1

    ColumnTree doesn't exist in Ext.Net 2

    I was using <ext:ColumnTree> in Ext.Net 1x but now..... I have to change it with Ext.Net 2x but I don't find <ext:ColumnTree> What control Do I have to use? I was using a [DirectMethod] and I return Json to fill my <ext.ColumnTree>.. This is my code for Ext.Net 1x but now .... How Can I do???

    I hope someone can help me... Thanks..

    ------- ASPX

    <ext:TabPanel ID="PanelPdf" runat="server" AutoWidth="true" Height="875"
                        <ext:Panel runat="server" ID="z_pnl_inicio" Header="false" Border="false" Height="840" AutoWidth="true"
                            Padding="10" Title="Explorador Documentos PDF" Icon="ApplicationOsx">
                                <ext:Panel ID="panel1" runat="server" Title="Viajes Terminados" Frame="true" AutoWidth="true" Height="830"
                                    Padding="5" Border="true">
                                        <ext:FitLayout ID="fitLayout2" runat="server" AutoWidth="true">
                                                <ext:ColumnTree ID="columnTree1" runat="server" RootVisible="true"
                                                    Title="&amp;nbsp;" Border="true" UseArrows="true" Mode="Remote"
                                                    Animate="true" AutoWidth="true">
                                                    <Co     lumns>
                                                        <ext:ColumnTreeColumn Header="Viajes" Width="130" DataIndex="Viaje" />
                                                        <ext:ColumnTreeColumn Header="No Guia" Width="100" DataIndex="Guia" />
                                                        <ext:ColumnTreeColumn Header="Viaje NISSAN" Width="80" DataIndex="ViajeNissan" />
                                                        <ext:ColumnTreeColumn Header="FechaEnvio" Width="150" DataIndex="Fecha" />
                                                        <ext:ColumnTreeColumn Header="Factura" Width="80" DataIndex="NoFactura" />
                                                        <ext:ColumnTreeColumn Header="Operador" Width="200" DataIndex="Operador" />
                                                        <ext:ColumnTreeColumn Header="Placas" Width="80" DataIndex="Placas" />
                                                                <ext:TreeNodeUIProvider Alias="col" ClassName="<%# ColumnTree.ColumnNodeUI %>" AutoDataBind="true" />
                                                        <ext:TreeNode NodeID="root" Hidden="true" />

    ---- CodeBehind with Direct Method
                    UO_MetodosDefault z_metodos = new UO_MetodosDefault();          
                    z_dataset = z_metodos.z_MetBuscaViajesGuias(folioviaje, claveoperador, fechainicial, fechafinal, viajeNISSAN, placas);
                    if (z_dataset != null)
                        if (z_dataset.Tables["ReportesPDF"].Rows.Count > 0)
                            if (z_dataset.Tables["ReportesPDF"].Rows[0][1].ToString() != "SQL_ERROR")
                                System.Collections.Generic.List<EmployeeTimeReg> list1 = new System.Collections.Generic.List<EmployeeTimeReg>();
                                for (int i = 0; i < z_dataset.Tables["ReportesPDF1"].Rows.Count; i++)
                                    list1.Add(new EmployeeTimeReg { Viaje = z_dataset.Tables["ReportesPDF1"].Rows[i]["ViajeTUM"].ToString() });                                
                                System.Collections.Generic.List<EmployeeTaskTimeReg> list2 = new System.Collections.Generic.List<EmployeeTaskTimeReg>();
                                for (int i = 0; i < z_dataset.Tables["ReportesPDF"].Rows.Count; i++)
                                    list2.Add(new EmployeeTaskTimeReg
                                        Viaje = z_dataset.Tables["ReportesPDF"].Rows[i]["ViajeTUM"].ToString(),
                                        PakingList = z_dataset.Tables["ReportesPDF"].Rows[i]["Guia"].ToString(),
                                        ViajeNissan = z_dataset.Tables["ReportesPDF"].Rows[i]["ViajeNissan"].ToString(),
                                        FechaEnvio = z_dataset.Tables["ReportesPDF"].Rows[i]["Fecha"].ToString(),
                                        NoFactura = z_dataset.Tables["ReportesPDF"].Rows[i]["NoFactura"].ToString(),
                                        Operador = z_dataset.Tables["ReportesPDF"].Rows[i]["Operador"].ToString(),
                                        Placas = z_dataset.Tables["ReportesPDF"].Rows[i]["Placas"].ToString()
                                Ext.Net.TreeNodeCollection nodes = new Ext.Net.TreeNodeCollection();
                                Ext.Net.TreeNode root = new Ext.Net.TreeNode("Viajes") { Expanded = true, NodeID = "0" };
                                foreach (EmployeeTimeReg item1 in list1)
                                    Ext.Net.TreeNode node = new Ext.Net.TreeNode();
                                    node.UIProvider = "col";
                                    node.CustomAttributes.Add(new Ext.Net.ConfigItem("Viaje", item1.Viaje, Ext.Net.ParameterMode.Value));
                                    node.Listeners.DblClick.Handler = "function(data){addTab(#{PanelPdf}, 'btnimg1', 'ASPX/VisorRS.aspx','ExploradorSalida', 'Salida', data.attributes.Viaje, '')}";
                                    ////node.Listeners.DblClick.Handler = "function(data){addTab(#{PanelPdf}, 'btnimg1', 'ASPX/Visor.aspx','ExploradorPdf', data.attributes.Viaje, '', '', '')}";
                                    foreach (EmployeeTaskTimeReg item2 in list2)
                                        if (item1.Viaje == item2.Viaje)
                                            Ext.Net.TreeNode nodeChild = new Ext.Net.TreeNode();
                                            nodeChild.UIProvider = "col";                                       
                                            nodeChild.CustomAttributes.Add(new Ext.Net.ConfigItem("Viaje", item2.Viaje, Ext.Net.ParameterMode.Value));
                                            nodeChild.CustomAttributes.Add(new Ext.Net.ConfigItem("Guia", item2.PakingList, Ext.Net.ParameterMode.Value));
                                            nodeChild.CustomAttributes.Add(new Ext.Net.ConfigItem("ViajeNissan", item2.ViajeNissan, Ext.Net.ParameterMode.Value));
                                            nodeChild.CustomAttributes.Add(new Ext.Net.ConfigItem("Fecha", item2.FechaEnvio, Ext.Net.ParameterMode.Value));
                                            nodeChild.CustomAttributes.Add(new Ext.Net.ConfigItem("NoFactura", item2.NoFactura, Ext.Net.ParameterMode.Value));
                                            nodeChild.CustomAttributes.Add(new Ext.Net.ConfigItem("Operador", item2.Operador, Ext.Net.ParameterMode.Value));
                                            nodeChild.CustomAttributes.Add(new Ext.Net.ConfigItem("Placas", item2.Placas, Ext.Net.ParameterMode.Value));
                                            nodeChild.Icon = Ext.Net.Icon.PageWhiteAcrobat;
                                            nodeChild.Listeners.DblClick.Handler = "function(data){addTab(#{PanelPdf}, 'btnimg12', 'ASPX/VisorRS.aspx','ExploradorGuia', 'Guia', data.attributes.Viaje, data.attributes.Guia)}";
                                            ////nodeChild.Listeners.DblClick.Handler = "function(data){addTab(#{PanelPdf}, 'btnimg1', 'ASPX/Visor.aspx','ExploradorPdf', data.attributes.Viaje, data.attributes.Guia, '', '')}";
                                            nodeChild.Leaf = true;
                                return nodes.ToJson();

    ---- JavaScrip to fill
    function buscar() {
        panel1.el.mask('Buscando...', 'x-loading-mask', false);    
        Cool.buscar(z_txt_viaje.getValue(), z_CboBox_operador.getValue(), 
                    (z_DateFld_AltaInicial.getValue() == '') ? '' : z_DateFld_AltaInicial.getValue().toDateSQLRango('Inicio'),
                     (z_DateFld_AltaFinal.getValue() == '') ? '' : z_DateFld_AltaFinal.getValue().toDateSQLRango('Fin'),
                       z_txtViajeNissan.getValue(), z_txtTipoPlacas.getValue(), {
                         success: function (msg) {
                             if (msg != 'error' && msg != 'vacio') {
                                 var nodes = eval(msg);
                             else if (msg == 'vacio') {
                                 Ext.Msg.alert('Aviso', "No se encontraron registros con los filtros de Busqueda especificados.");
                         failure: function (msg) {
                             Ext.Msg.alert('Alerta', "No se puedo establecer comunicacion con el Servidor.");
    Last edited by Daniil; Nov 13, 2012 at 4:12 PM. Reason: Please use [CODE] tags
  2. #2
    Hi @vperez23,

    Now a common TreePanel supports additional columns.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi @vperez23,

    Now a common TreePanel supports additional columns.
    Much Thank It's perfect I will use It... Can I fill TreePanel from Json in JavaScrip???
  4. #4
    Take a look on the following Thread:

    it's just to advise that you can have only one TreeColumn
  5. #5
    Quote Originally Posted by vperez23 View Post
    Can I fill TreePanel from Json in JavaScrip???
    I would use the setRootNode method.!...od-setRootNode

Similar Threads

  1. [CLOSED] gridPanel after edit event doesn't exist
    By Daly_AF in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 15, 2012, 10:22 AM
  2. [CLOSED] Click listener doesn't exist within Node component
    By Daly_AF in forum 2.x Legacy Premium Help
    Replies: 5
    Last Post: Aug 06, 2012, 12:21 PM
  3. [CLOSED] MiniListWidth doesn't exist within combobox list config
    By Daly_AF in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Jul 19, 2012, 5:09 PM
  4. Replies: 1
    Last Post: Nov 19, 2011, 8:32 AM
  5. DirectMethod OnLoad event does not exist
    By alvaromagnum in forum 1.x Help
    Replies: 3
    Last Post: Jul 17, 2011, 8:27 AM

Tags for this Thread

Posting Permissions