1. #161
    Sencha User
    Join Date
    Mar 2011
    Posts
    4
    Vote Rating
    0
    medianueva is on a distinguished road

      0  

    Default


    Hahaha, you're right. I just had something wrong in my code...doh!

  2. #162
    Sencha User
    Join Date
    Jan 2011
    Posts
    59
    Vote Rating
    0
    Nicodemuz is on a distinguished road

      0  

    Default


    How do I customize the sorting? I have been trying to add a custom sortType function in my model, but this doesn't seem to work.

    Code:
    sortType: function(value) {
    	console.log('Sorting value: ' + value);
    }
    Any pointers?

  3. #163
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Vote Rating
    854
    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


    You are putting the sortType on the separate field not just the Model?
    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.

  4. #164
    Sencha User
    Join Date
    Aug 2010
    Posts
    9
    Vote Rating
    0
    wiggerl3000 is on a distinguished road

      0  

    Default


    Hey Guys,

    first of all that`s a great extension.
    My question is how can i display two or more mappings in one column. I got it to work but I see curly brackets in front and at the end.

    Greets from Germany

  5. #165
    Sencha User
    Join Date
    Jan 2011
    Posts
    59
    Vote Rating
    0
    Nicodemuz is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    You are putting the sortType on the separate field not just the Model?
    Yeah, sorry I was a bit unclear. I am adding the sortType on my fields, yes. Have you been able to use custom sorting before?

  6. #166
    Sencha User
    Join Date
    Mar 2009
    Posts
    1
    Vote Rating
    0
    romeuhcf is on a distinguished road

      0  

    Default Missing rows when inside another panel

    Missing rows when inside another panel


    Hi Mitchell,

    I'm having some difficulties and appreciate some help.

    I've prepared a simple test on using TouchGridPanel inside another Panel. I can see the header but not the data rows. I read this forum thread and noticed Nicodemuz and irocker had similar problems and I'd tried the suggestions with no success.

    Based on github's last code I modified main.js to this:


    PHP Code:
    Ext.regModel("TestModel", {
            
    fields     : [
            
    "company",
            
    "price",
            
    "change",
            
    "pct",
            
    "updated"
            
    ]
    });

    var 
    store = new Ext.data.Store({
            
    model "TestModel",
            
    data  : [
                    { 
    company "3m Co"price 71.72change 0.02,  pct 0.03,  updated "9/1/2010" },
                    { 
    company "Alcoa Inc"price 29.01change 0.42,  pct 1.47,  updated "9/1/2010" }
            ]
    });

    Ext.setup({
            
    onReady : function() {
                    var 
    grid = new Ext.ux.TouchGridPanel({
                            
    layout"fit",
                            
    store       store,
                            
    multiSelect false,
                            
    colModel    : [{
                                    
    header   "Company",
                                    
    mapping  "company",
                                    
    flex     1
                            
    }]
                    });
                    var 
    main =  new Ext.Panel({
                            
    fullscreen  true,
                            
    dockedItems : [{html'something<br/>at right dock bar'dock:'right'}, {html'something at top dock bar'dock:'top'}],
                            
    items : [grid]
                    });
            }
    }); 
    I've tried also some combinations on layout, fullscreen and flex options for TouchGridPanel constructor and noticed that:
    * when layout is blank the rows appears but do not resize when window does.
    * when fullscree is true, the data appears but flow over my sidebar, hiding partially it.

    What am I missing?

    Thanks and regards.

  7. #167
    Sencha User
    Join Date
    Jan 2011
    Posts
    59
    Vote Rating
    0
    Nicodemuz is on a distinguished road

      0  

    Default


    I also remember having some similar problems. Try giving your Panel and TouchGridPanel both a flex of 1.

  8. #168
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    37,073
    Vote Rating
    854
    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 Nicodemuz View Post
    I also remember having some similar problems. Try giving your Panel and TouchGridPanel both a flex of 1.
    Just doing this:

    Code:
    var main =  new Ext.Panel({
    	fullscreen  : true,
    	dockedItems : [{html: 'something<br/>at right dock bar', dock:'right'}, {html: 'something at top dock bar', dock:'top'}],
    	items : [grid]
    });
    Will not cut it because the main Panel is not doing any sizing. You need to at least use FitLayout. This works perfectly without changing anything but the main Panel:

    Code:
    var main =  new Ext.Panel({
    	fullscreen  : true,
    	dockedItems : [{html: 'something<br/>at right dock bar', dock:'right'}, {html: 'something at top dock bar', dock:'top'}],
    	layout : 'fit',
    	items : [grid]
    });
    Now the main Panel is using a layout that will automatically size it's child item.

    NOTE - watch for overnesting. I know you said it was a striped down version but Ext.ux.TouchGridPanel is extending Panel so in this small code snippet you do not need main Panel.
    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.

  9. #169
    Sencha User
    Join Date
    Jan 2011
    Posts
    59
    Vote Rating
    0
    Nicodemuz is on a distinguished road

      0  

    Default


    Quote Originally Posted by Nicodemuz View Post
    Yeah, sorry I was a bit unclear. I am adding the sortType on my fields, yes. Have you been able to use custom sorting before?
    Hi Mitchell,

    Do you have any insight on how I could make custom sorting work for a specific column? Would much appreciate a solution for this.

    Cheers,
    Nico

  10. #170
    Sencha User
    Join Date
    Mar 2011
    Posts
    1
    Vote Rating
    0
    vkumar123 is on a distinguished road

      0  

    Default freezing columns of th edatagrid

    freezing columns of th edatagrid


    Hi Mitchell,

    Appreciate your great work.

    Is there a provison to freeze specific columns of the datagrid( similar to hiding & showing columns ). It is a business requirement.

    I tried instantiating 2 grid objects , but ran into issues trying
    to synchronizing the horizontal scrolling of the non-frozen grid
    ( it keeps sanpping back ) with scroller object on the dataviews,
    though colud synchronize the vertical scrolling of the 2 grids.


    Thanks.