1. #1
    Sencha User tdikarim's Avatar
    Join Date
    Jun 2007
    Location
    Belgium - Brussel
    Posts
    142
    Vote Rating
    0
    tdikarim is an unknown quantity at this point

      0  

    Default How to retrieve record definition

    How to retrieve record definition


    Hi,

    I have a grid that is loaded by metadata

    i a classic way I have
    var MyRecordType = Ext.data.Record.create(['col1', 'col2']);
    var myrec = new MyrecordType({"col1":"101", "col2":"1234"});
    grid.store.insert(i,myrec);

    BUT, I don't want to hard code the record type on the client side
    Does exist a way to retrieve them from the store and have the same result in myrec ?

    Thanks for your help
    Tamditi Karim

  2. #2
    Sencha User tdikarim's Avatar
    Join Date
    Jun 2007
    Location
    Belgium - Brussel
    Posts
    142
    Vote Rating
    0
    tdikarim is an unknown quantity at this point

      0  

    Default [SOLVED] How to retrieve record definition

    [SOLVED] How to retrieve record definition


    Here is my solution.

    PHP Code:
    oneRecordDef Ext.data.Record.create(grid.store.reader.jsonData.metaData.fields);
    oneRecordEmpty = new oneRecordDef(grid.store.reader.jsonData.rootDataDefaultValue[0]);

    grid.store.insert(i,oneRecordEmpty); 
    and the json for rootDataDefaultValue is like
    PHP Code:
       "rootDataDefaultValue":[
          {
             
    "CIV_ID":"0 ",
             
    "CIV_LANGUE":"'' ",
             
    "CIV_ORDRE":"0",
             
    "CIV_LIBELLE":"''",
             
    "CIV_ID_SEXE":"0",
             
    "CIV_DELETED":"0"
          
    }
       ], 
    Tamditi Karim

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi