1. #141
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Vote Rating
    853
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Quote Originally Posted by TonyBones View Post
    Don't know what happened, but now its working. Maybe I didn't hard refresh. Thanks for your help mitchellsimoens!!!
    Great!

    Just uploaded a quick MVC example. Basically the default app that is created when you create an app with Sencha Command and added a 3rd tab at the bottom with a simple grid.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  2. #142
    Sencha User
    Join Date
    May 2012
    Posts
    2
    Vote Rating
    0
    vitand is on a distinguished road

      0  

    Default getting an error in constructor (View.js)

    getting an error in constructor (View.js)


    Just downloaded Ext.ux.touch.grid from github, but when I tried to use it in my project I got the following error.
    • [COLOR=red !important]Uncaught TypeError: Cannot read property 'features' of undefined [/COLOR]Ext.define.constructor View.js:21
    Debugging View.js I found that config is undefined in constructor: function(config) {

    Here is the code where I am defining the datagrid

    Ext.define('mobile.view.test.Test', {
    extend: 'Ext.ux.touch.grid.View',
    requires: [
    'Ext.ux.touch.grid.View',
    'Ext.ux.touch.grid.feature.Feature',
    'Ext.ux.touch.grid.feature.Sorter'
    ],
    layout: 'fit',
    config: {
    store : 'mobile.test.TestStore',


    features : [
    {
    ftype : 'Ext.ux.touch.grid.feature.Sorter',
    launchFn : 'initialize'
    }
    ],
    columns : [
    {
    header : 'Name',
    dataIndex : 'name',
    style : 'padding-left: 1em;',
    width : '40%',
    filter : { type : 'string' }
    },
    {
    header : 'Class Path',
    dataIndex : 'classPath',
    style : 'text-align: center;',
    width : '15%',
    filter : { type : 'string' }
    }
    ]
    }
    });

    Has anybody experienced the same issue ?
    Thanks

  3. #143
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      0  

    Default


    I'm having a rendering problem now. All my data items / rows are there, but the x-body x-scroll-view container div has a height of 0px. So all I see is the header across the top. If I manually change the the height then i see my rows. I tried using layout: 'fit' in the parent panel, but when i do then everything disappears. I'm not using fullscreen because i have it as a nested object in a tab panel.

    The touchgridpanel's css is included and working. Any other ideas?

  4. #144
    Sencha User
    Join Date
    Dec 2009
    Posts
    52
    Vote Rating
    6
    TonyBones is on a distinguished road

      0  

    Default


    Boom! figured it out.

    It doesn't like this, these are child items of a Tab Panel
    Code:
    {
    title: 'Approvals', iconCls: 'organize', items: [ {
    docked: 'top', xtype: 'titlebar', title: 'Approvals'
    }, {
    xtype: 'touchgridpanel', title: 'grid', store: 'ApprovalLineItemStore', columns: [ ... ]
    but it does like this as tab panel child
    Code:
    {
    xtype: 'touchgridpanel', title: 'Approvals', iconCls: 'organize', store: 'ApprovalLineItemStore', items: [
    {
    docked: 'top', xtype: 'titlebar', title: 'Approvals'
    }
    ], columns: [ ... ]
    Last edited by TonyBones; 4 May 2012 at 3:05 PM. Reason: Code Formatting

  5. #145
    Touch Premium Member
    Join Date
    Feb 2011
    Location
    San Diego, CA
    Posts
    43
    Vote Rating
    4
    tinyfactory is on a distinguished road

      0  

    Default EmptyText?

    EmptyText?


    I see this component extends DataView, but I can't get it to use the emptyText value. Is there a good way to display emptyText when the grid has no records?

    Thanks for the great component. Extremely helpful!

    Alex

  6. #146
    Sencha User
    Join Date
    Oct 2011
    Posts
    6
    Vote Rating
    0
    potnuru is on a distinguished road

      0  

    Default Sorting doesn't work on the Ext.ux.touch.grid

    Sorting doesn't work on the Ext.ux.touch.grid


    Recently downloaded Ext.ux.touch.grid from github, but when I tried to use it in my project it works without any error in the console.

    But the sorting functinality doesn't work on this grid.

    Here is the view code where I am defining the datagrid

    PHP Code:
    Ext.define('LSTablet.view.quoter.AllQuotesSummary', {
        
    extend'Ext.Container',
        
    xtype'allQuotesSummary',
        
    id'allQuotesSummary',
        
    layout'vbox',
        
    fullscreentrue,
        
        
    layoutConfig: {
      
    align'center'
     
    },
        
    requires: [
                   
    'Utils.Renderer',
                   
    'Ext.XTemplate',
                   
    'Ext.util.Format',
                   
    'Ext.field.Email'
                   
    'Ext.field.Select'
                   
    'Ext.field.Spinner'
                   
    'Ext.field.DatePicker',
                   
    'Ext.ux.touch.grid.View'
                   
    'Ext.ux.touch.grid.feature.Feature'
                   
    'Ext.ux.touch.grid.feature.Sorter',
                   
    'LSTablet.view.quoter.DealQuoteSummary',
                   ],
        
    config: {
           
            
         
    items: [{
               
    xtype'toolbar',
               
    docked'top',
               
    ui'toolbarui',
               
    items: [{
                     
    xtype'button',
                     
    text'Main Menu',
                     
    ui'buttonuiblack',
                     
    id'quoteBackButton',
                     
    name'quoteBackButton'
                 
    }, 
                 {
                     
    xtype'spacer'
                 
    }, 
                 {
                     
    xtype'title',
                     
    title'All Quotes'
                 
    }, 
                 {
                     
    xtype'spacer'
                 
    }]
            }, 
            
            {
                
    xtype'toolbar',
                
    docked'top',
                
    ui'gridToolbar',
                
    cls'tableToolbar',
                
    items: [{
                       
    xtype'title',
                       
    title'All Quotes'
                   
    }, 
                   {
                       
    xtype'spacer'
                   
    }, 
                   {
                       
    xtype'button',
                       
    name'searchButton',
                       
    id'searchButton',
                       
    iconCls'search',
                       
    iconMasktrue,
                       
    cls'tableToolbarButton',
                       
    ui'buttonuiblack'
                   
    },
                   {
                       
    xtype'button',
                       
    name'addButton',
                       
    id'addButton',
                       
    iconCls'add',
                       
    iconMasktrue,
                       
    cls'tableToolbarButton',
                       
    ui'buttonuiblack'
                   
    }
                 ]
            }, 
            {
                
    xtype'touchgridpanel',
                
    id'allquotegrouppanel',
                
    height800,  
               
               
                
    features: [{
                     
    ftype'Ext.ux.touch.grid.feature.Sorter',
                     
    launchFn'initialize'
                
    }],
                
                
    columns: [  
                 {
                     
    header'Date',
                     
    dataIndex'updatedDate',
                     
    width'15%',
                     
    rendererUtils.Renderer.date,
                        
    style    'text-align: center;',
                        
    sortable true,
                        
                 }, 
                 {
                     
    header'Customers',
                     
    dataIndex'customerName',
                     
    width'35%',
                     
    style    'text-align: center;',
                    
                 }, 
                 {
                     
    header'Quote Group Name',
                     
    dataIndex'quoteGroupName',
                     
    width'25%',
                     
    style    'text-align: center;',
                 },
                 {
                     
    header'Financed Amount $',
                     
    dataIndex'totalFinancedAmount',
                     
    width'25%',
                     
    style    'text-align: center;',
                     
    rendererUtils.Renderer.dollar
                 
    }
             ],
            }],
        }
    }); 
    Has anybody experienced the same issue ?
    Thanks

  7. #147
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Vote Rating
    853
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    Do you have a store that the grid is using?
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  8. #148
    Sencha User
    Join Date
    Oct 2011
    Posts
    6
    Vote Rating
    0
    potnuru is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    Do you have a store that the grid is using?

    Here you go Mitchell .. I have store and model attached for you
    PHP Code:
    Ext.define('LSTablet.store.quoter.AllQuotesSummary', {
     
    extend'Ext.data.Store',
     
    requires: [ 'LSTablet.model.quoter.AllQuotesSummary'],
     
        
    requires: [
                   
    'Utils.Url',
        ],
     
    config:{
      
    model 'LSTablet.model.quoter.AllQuotesSummary',
      
    storeId 'AllQuotesSummaryStoreId',
            
    // remoteFilter: true,
            // remoteSort: false,
            
    autoLoadfalse,
            
    proxy: {
                  
    type'ajax',
                  
    actionMethods: {
                       
    read'GET'
                  
    },
                  
    urlUtils.Url.rootPath Utils.Url.getAllMyQuoteGroupsURL
                  
    startParamtrue,
                  
    extraParams: {},
                  
    requestPayload:{},
                  
    enablePagingParamsfalse,
                  
    noCachefalse,
                  
    headers: {             
                      
    'Content-Type''application/json;'
                  
    },
                  
    reader: {
                      
    type'json',
                      
    rootProperty'data'
                  
    }
         }
     } 
    });



    Ext.define("LSTablet.model.quoter.AllQuotesSummary", {
        
    extend'Ext.data.Model',
        
    config: {
             
    fields: [{
                    
    name"quoteGroupId",
                    
    type"int"
                
    }, 
                {
                    
    name"quoteGroupName",
                    
    type"string"
                
    }, 
                {
                    
    name"quoteGroupStatus",
                    
    type"string"
                
    }, 
                {
                    
    name"customerName",
                    
    type"string"
                
    },
                {
                    
    name"totalFinancedAmount",
                    
    type"int"
                
    },
                {
                    
    name"updatedDate",
                    
    type"int"
                
    }]
        },

       
    }); 

  9. #149
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Vote Rating
    853
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    I don't see where in your grid that you are specifying the store
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  10. #150
    Sencha User
    Join Date
    Oct 2011
    Posts
    6
    Vote Rating
    0
    potnuru is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    I don't see where in your grid that you are specifying the store
    Mitchell I kind of do it in the controller. Here is the controller snippet

    PHP Code:
        loadQuoteGroups: function(){
            
    console.log('loadQuoteGroups for allQuotesSummary'); 
            
    Ext.getStore('AllQuotesSummaryStoreId').load({
                    
    callbackthis.onAllQuoteGroupsLoaded,            
                    
    scopethis,
                });   

        },

        
    onAllQuoteGroupsLoaded: function(){
            var 
    quoteIdStore Ext.getStore('AllQuotesSummaryStoreId'); 
            
    this.getGridPanel().setStore(quoteIdStore);
        },