1. #11
    Ext User
    Join Date
    Oct 2008
    Posts
    78
    Vote Rating
    0
    nick saint is on a distinguished road

      0  

    Default


    did it. thank you. sorry I know not much about it all, just learning.
    The grid shows all the data I need but there is no way I can sort it. by the netto | brutto
    can you give me a hint?
    Thank you
    Nick

  2. #12
    Ext User
    Join Date
    Jul 2007
    Location
    Florida
    Posts
    9,996
    Vote Rating
    5
    mjlecomte will become famous soon enough mjlecomte will become famous soon enough

      0  

    Default


    Review the Docs again, post your code....

  3. #13
    Ext User
    Join Date
    Oct 2008
    Posts
    78
    Vote Rating
    0
    nick saint is on a distinguished road

      0  

    Default


    Hi,
    I just don't know what but I missed something with for ... in loop.
    the result I get is like shown on the picture.

    the JSON data I have:
    PHP Code:
    {
             success:true,
             totalCount: 11,
             cntr: 102,
             area:1,
             supl:10,
             rateitems:[{key:0, discr: {
                         group :'E',
                          sipp :'idar',
                          exampl :'mazda 2 aut',
                          kpp :'+' },
                              rateData: [{
                                 14:{ n: 46, b: 46 },
                                 8:{ n: 46,  b: 46 },
                                 7:{ n: 46,  b: 46 },
                                 3:{ n: 52,  b: 52 } }] }, .....]}The store:

        var store = new Ext.data.JsonStore({
            id:'group',
            idProperty: 'key',
            totalProperty:'totalCount',
            root:'rateitems',
            url:'<?= HTTP_SERVER;?>layouts/settings/gen/coresetrateout.php',
            fields: [
               {name: 'group', mapping: 'discr.group'},
               {name: 'sipp', type: 'string', mapping: 'discr.sipp'},
               {name: 'exampl', type: 'string', mapping: 'discr.exampl'},
               {name: 'kpp', type: 'string', mapping: 'discr.kpp'}

    <?php
              
    foreach($daylist as $key => $val){  
                echo 
    ",{name: '".$val."', type: 'int', convert: getRate }\n";
              }
    ?> ]});

    Convert function:

    function getRate(v,rec) {

         //console.log(rec.rateData);
         for (i in rec.rateData){
         //console.log(rec.rateData[i]);

             for (x in rec.rateData[i]){
             //console.log(rec.rateData[i][x].n);
             //console.log(rec.rateData[i][x].n +' | '+ rec.rateData[i][x].b);
             return rec.rateData[i][x].n +' | '+ rec.rateData[i][x].b; // <== it returns only the first value for all cells for the given row
             }
         }
    };
    Sorry for bothering, it might look easy but I really do not know where I missed
    Thank you
    Nick
    Attached Images

  4. #14
    Ext User
    Join Date
    Oct 2008
    Posts
    78
    Vote Rating
    0
    nick saint is on a distinguished road

      0  

    Default


    case is closed. I found the easier way.
    thank you
    Nick

Thread Participants: 2

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar