/*
 * Ext JS Library 2.0
 * Copyright(c) 2006-2007, Ext JS, LLC.
 * licensing@extjs.com
 * 
 * http://extjs.com/license
 */

Ext.onReady(function(){
    var tree = new Ext.tree.ColumnTree({
        el:'tree-ct',
        //width:552,
        autoHeight:true,
        rootVisible:false,
        autoScroll:true,
        title: 'DAFTAR INSTANSI PENGADILAN SELURUH INDONESIA',
        
        columns:[{
            header:'Nama Instansi',
            width:350,
            dataIndex:'nama'
        },{
            header:'Kelas',
            width:100,
            dataIndex:'kelas'
        },{
            header:'Jumlah perkara',
            width:100,
            dataIndex:'perkara'
        }],

        loader: new Ext.tree.TreeLoader({
            dataUrl:'dt_inst.php',
            uiProviders:{
                'col': Ext.tree.ColumnNodeUI
            }
        }),

        root: new Ext.tree.AsyncTreeNode({
            text:'Tasks'
        })
    });
    tree.render();
});