-3
  1. I could not paginate on the grid. I looked through their examples but encountered proxy errors. I share my own code. I will be glad if you help.

    I share my codes below

Sefa Kuru
  • 13
  • 6
  • May you provide the server answer? – Arthur Rubens Aug 12 '20 at 16:43
  • Where do you define 'baslangic_tarih' and 'bitis_tarih'? Why are you using jQuery $.ajax() method, there is already Ext.Ajax() method in the ExtJs 3.4 (https://docs.sencha.com/extjs/3.4.0/#!/api/Ext.Ajax). – Arthur Rubens Aug 12 '20 at 16:48

1 Answers1

0

        Ext.QuickTips.init();

        Ext.state.Manager.setProvider(new Ext.state.CookieProvider());

        var grid_data_veri;
        var grid_array = [];
        $.ajax({ 
        type: 'GET', 
        url: 'ajaxQueryData?_qid=4146&xirsaliye_dt_k='+baslangic_tarih+'&xirsaliye_dt_b='+bitis_tarih, 
        data: { get_param: 'value' }, 
        dataType: 'json',
        async: false,
        success: function (kat, data) { 
        var kat_sayisi = kat.browseInfo.totalCount;


        for(var i_kat = 0; i_kat < kat_sayisi; i_kat++) {



        var json = {
        "sira_no":sira_no ,
        "branch_id":kat.data[i_kat].branch_id_qw_,
        "firma": kat.data[i_kat].firma



        };



        grid_array.push(json);
        }


        grid_data_veri = JSON.stringify(grid_array);




        var store = new Ext.data.JsonStore({

        fields: [
        {name: "sira_no", type: "int"},
        {name: "branch_id"},
        {name: "firma"}

        ]
        });

        // manually load local data
        store.loadData(Ext.decode(grid_data_veri));

        // create the Grid
        var grid = new Ext.grid.GridPanel({
        store: store,
        columns: [
        {
        id       :'sira_no',
        header   : 'Sıra No', 
        width    : 50, 
        sortable : true, 
        dataIndex: 'sira_no'
        },
        {
        header   : 'Şube', 
        width    :150, 
        sortable : true, 

        dataIndex: 'branch_id'
        }
        ,
        {
        header   : 'Firma', 
        width    :250, 
        sortable : true, 

        dataIndex: 'firma'
        }

        ],

        stripeRows: true,


        height:395,
        width: 650,
        stateful: true,
        stateId: 'grid'

        });

        grid.render('grid');

        }
        }); 
Sefa Kuru
  • 13
  • 6