1. #61
    Sencha User
    Join Date
    Dec 2011
    Posts
    103
    Vote Rating
    0
    mike lebowski is on a distinguished road

      0  

    Default


    Quote Originally Posted by mitchellsimoens View Post
    This is a bug within DataView so we will have to wait for it to get fixed in the framework. I do not do anything special for selecting.
    Any idea if this has been fixed in the RC?

  2. #62
    Sencha User
    Join Date
    Jun 2007
    Posts
    258
    Vote Rating
    4
    hallikpapa is on a distinguished road

      0  

    Default


    How would you handle custom rendering? I am trying to color code cells based on data returned, but one thing is passed into the renderer: the record.

    Any suggestion on the best way to style a cell before rendering?

    Code:
     header   : "External",
     dataIndex: 'ueid',
     style    : "text-align: center;",
     width    : 100,
     renderer : function(empty_var, rec) {
                        if (rec.m_id == rec.MozMax.ueid) {
                            console.log('This is where I want to color the cell green');
                        }
                        return rec.MozPage.ueid;
                    }

  3. #63
    Sencha User
    Join Date
    Dec 2011
    Posts
    103
    Vote Rating
    0
    mike lebowski is on a distinguished road

      0  

    Default


    Quote Originally Posted by hallikpapa View Post
    How would you handle custom rendering? I am trying to color code cells based on data returned, but one thing is passed into the renderer: the record.

    Any suggestion on the best way to style a cell before rendering?

    Code:
     header   : "External",
     dataIndex: 'ueid',
     style    : "text-align: center;",
     width    : 100,
     renderer : function(empty_var, rec) {
                        if (rec.m_id == rec.MozMax.ueid) {
                            console.log('This is where I want to color the cell green');
                        }
                        return rec.MozPage.ueid;
                    }
    Maybe I am missing your point. I am not sure what you mean by "before rendering". I am using the render method to test the value, and conditionally determine a display value, and a css class , and then I finish render like this:
    return '<span class="' + cls + '">' + displayValue + '</span>';

    Not sure if that helps you.

  4. #64
    Sencha User
    Join Date
    Dec 2011
    Posts
    103
    Vote Rating
    0
    mike lebowski is on a distinguished road

      0  

    Default


    question for Mitchell, is there a properties way to add styling (cls) to a column header?
    Or that will have to be done thru css selectors? I am asking b/c I am thinking of one case where i might want different styling for certain column headers within the same grid.

  5. #65
    Sencha User
    Join Date
    Feb 2011
    Posts
    74
    Vote Rating
    3
    shaneavery is on a distinguished road

      0  

    Thumbs up Fixed...

    Fixed...


    @Mike Lebowski,

    You asked:

    Any idea if this has been fixed in the RC?
    The answer is "Yes". I am using RC and it is working correctly now.

  6. #66
    Sencha User
    Join Date
    Jun 2007
    Posts
    258
    Vote Rating
    4
    hallikpapa is on a distinguished road

      0  

    Default


    Quote Originally Posted by mike lebowski View Post
    Maybe I am missing your point. I am not sure what you mean by "before rendering". I am using the render method to test the value, and conditionally determine a display value, and a css class , and then I finish render like this:
    return '<span class="' + cls + '">' + displayValue + '</span>';

    Not sure if that helps you.
    So simple I didn't see it. I was able to style the text, I will try and make the background a specific color too. Thanks!

    What about if I wanted to change the style of a whole row background based on a value of a certain column? Is there a way with this grid plugin to select specific row and style it so it's highlighted? For instance, Say I am looping through records in the store, and if any value in the column "status" == "ok", I want to color the entire row green.

  7. #67
    Sencha User
    Join Date
    Jan 2012
    Posts
    4
    Vote Rating
    0
    atl is on a distinguished road

      0  

    Default


    Quote Originally Posted by Surykat View Post
    Great component!

    But i got a problem with applying features during re-open view with gridview component. The console throw me an error:
    Code:
    Uncaught Error: [Ext.create] Invalid class name or alias 'undefined' specified, must be a non-empty string
    


    I debug that and it is after calling 'me.callParent(arguments)' method.

    Any ideas how to workaround that??
    I am having this issue too - the first time it is created fine, when I destroy and recreate it throws that error.. It appears this is the offending line:

    Code:
    feature = Ext.create(feature, cfg);
    I'm new to this framework, but from debugging it looks like cfg.grid doesn't have a cls when recreating so I changed that line to:
    Code:
    if (cfg.grid.hasOwnProperty('_cls')) {
         feature = Ext.create(feature, cfg);
    }
    The first time it evaluates to true, but when recreating it skips that line. Not sure what the consequenses are, and I doubt its the root cause or the right approach but it works in a pinch. I am just trying to put together a mockup so it is no worries at the moment, but I would like to know why this is failing before creating an application with Sencha Touch.

  8. #68
    Sencha User
    Join Date
    Feb 2012
    Posts
    86
    Vote Rating
    0
    alohainc is on a distinguished road

      0  

    Default Alternate row color

    Alternate row color


    Hey I am new to sencha, how can I add alternate row color to Ext.ux.touch.grid?

  9. #69
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    35,735
    Vote Rating
    756
    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


    Use CSS pusedo selector.
    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. #70
    Sencha User
    Join Date
    Feb 2012
    Posts
    86
    Vote Rating
    0
    alohainc is on a distinguished road

      0  

    Default


    Not getting exactly how to use CSS pusedo selector in "Ext.ux.touch.grid".

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