Page 1 of 14 12311 ... LastLast
Results 1 to 10 of 132

Thread: [2.0] Autogrid (now with serverside column storage)

  1. #1
    Sencha User
    Join Date
    Mar 2007
    Posts
    464
    Vote Rating
    1
      0  

    Talking [2.0] Autogrid (now with serverside column storage)

    For the ones interested, I ported my autogrid to Ext2.0. It's compatible with the latest SVN Build. Demo and latest source always available here:
    http://ux.designism.nl/ux/autogrid2/

    Main new feature is storing column and sort info back to the server. Example php source is available in the demo as well (settings are serialized and stored in a txt file). Normal usage would be to store them in a table linked to the current user account.

    Suggestions and improvements are welcome.

  2. #2
    Ext User
    Join Date
    Mar 2007
    Posts
    30
    Vote Rating
    0
      0  

    Default Already in 2.0

    I think the meta features already built into 2.0 namespaces, which in a single query,
    the meta and data can be retrieve together, and being loaded as well.
    This is only based on my understanding

  3. #3
    Sencha User
    Join Date
    Mar 2007
    Posts
    464
    Vote Rating
    1
      0  

    Default

    hmm could you give me a tip where to look?

  4. #4
    Ext User
    Join Date
    Mar 2007
    Posts
    30
    Vote Rating
    0
      0  

    Default In 2.0 code base

    Consider this is already part of the code base of 2.0 (a portion of jsonreader)

    PHP Code:
        read : function(response){
            var 
    json response.responseText;
            var 
    = eval("("+json+")");
            if(!
    o) {
                throw {
    message"JsonReader.read: Json object not found"};
            }
            if(
    o.metaData){
                
    delete this.ef;
                
    this.meta o.metaData;
                
    this.recordType Ext.data.Record.create(o.metaData.fields);
                
    this.onMetaChange(this.metathis.recordTypeo);
            }
            return 
    this.readRecords(o);
        }, 

  5. #5
    Ext User
    Join Date
    Mar 2007
    Posts
    30
    Vote Rating
    0
      0  

    Default Json Data

    Further more, the returned data from my server side (this is ashx handler) look like follows:
    ( I can also embed more config inside the metaData sections), my server code generate json
    by a custom class instead of a convertor, which I think will be more accurate and easy.
    Thanks

    PHP Code:
    {

    "items" : [

    {
    "id" "TRIST" "port_id" "TRIST" "port_name" "ISTANBUL" "region_id" "MED" "country_id" "TR"},
    {
    "id" "TRIZM" "port_id" "TRIZM" "port_name" "IZMIR" "region_id" "MED" "country_id" "TR"},
    ...
    ],

    "metaData" : { 

        
    "fields" : [
            {
    "name" "id""type" "string" } ,
            {
    "name" "port_id""type" "string" } ,
            {
    "name" "port_name""type" "string" } ,
            {
    "name" "region_id""type" "string" } ,
            {
    "name" "country_id""type" "string" }
        ],

        
    "columns" : [
            {
    "header" "#id""dataIndex" "id""width" 75"editable" true"editor" : new Ext.form.TextField({allowBlankfalse}), "sortable" true"hidden" true  } ,
            {
    "header" "#port_id""dataIndex" "port_id""width" 75"editable" true"editor" : new Ext.form.TextField({allowBlankfalse}), "sortable" true"hidden" false  } ,
            {
    "header" "#port_name""dataIndex" "port_name""width" 75"editable" true"editor" : new Ext.form.TextField({allowBlankfalse}), "sortable" true"hidden" false  } ,
            {
    "header" "#region_id""dataIndex" "region_id""width" 75"editable" true"editor" : new Ext.form.TextField({allowBlankfalse}), "sortable" true"hidden" false  } ,
            {
    "header" "#country_id""dataIndex" "country_id""width" 75"editable" true"editor" : new Ext.form.TextField({allowBlankfalse}), "sortable" true"hidden" false  }
        ],

        
    "scope" "demoserver",
        
    "entity" "port_mast",
        
    "sort" "port_name",
        
    "dir" "ASC",
        
    "start" "0",
        
    "limit" "25",
        
    "id" "port_id",
        
    "root" "items",
        
    "totalProperty" "totalCount",
        
    "totalCount" "673"
    }


  6. #6
    Sencha User
    Join Date
    Mar 2007
    Posts
    464
    Vote Rating
    1
      0  

    Default

    The onMetaChange event is what I'm using to generate the columns. I see that meta.fields and meta.sortinfo are used in Store.js but I really cant find any code that support columns and other stuff.

  7. #7
    Ext User
    Join Date
    Mar 2007
    Posts
    30
    Vote Rating
    0
      0  

    Default Sorry, misleading

    the columns features is my extension, sorry for misleading. as I use part of my project code for illustration. Thanks

  8. #8
    Ext User Grimsk's Avatar
    Join Date
    Jul 2007
    Location
    Saint-Georges, Canada
    Posts
    101
    Vote Rating
    0
      0  

    Default

    cant see anything with IE

  9. #9
    Sencha User
    Join Date
    Mar 2007
    Posts
    464
    Vote Rating
    1
      0  

    Default

    You're right sorry. Should be fixed now.

  10. #10
    Ext User
    Join Date
    Jul 2007
    Location
    Belgium
    Posts
    74
    Vote Rating
    0
      0  

    Default

    I don't know if it's only in my firefox but if I want to change the columnorder, I only can switch the first column. If I select for eg. the last column and want to place it as first it just doesn't lock (can't get the blue arrows). In IE this is no problem...
    Just want to let you know ;-)

    But besides that, great work!

Page 1 of 14 12311 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •