1. #1
    Sencha User
    Join Date
    Sep 2008
    Location
    Italy
    Posts
    11
    Vote Rating
    0
    _sandro_ is on a distinguished road

      0  

    Default TreeGrid text style

    TreeGrid text style


    Hi everybody.

    Using a TreeGrid, how can i change the style of text (that appear near the tree icon) in the TreeGrid, only for some rows? I know it is possible to change the text style in the other columns of the associated grid implementing a GridCellRenderer interface and overriding the render method, but i don't find a similar solution with the class TreeGridCellRenderer.

    Thanks.

  2. #2
    Sencha User
    Join Date
    May 2010
    Posts
    5
    Vote Rating
    0
    Quartilan is on a distinguished road

      0  

    Default


    You can use the WidgetTreeGridCellRenderer for the first column. Then you can still determine if you wan't the style of the text to be changed.

    example:
    Code:
    private final WidgetTreeGridCellRenderer<Folder> renderer = new WidgetTreeGridCellRenderer<Folder>() {
    
    @SuppressWarnings("unchecked")
    @Override
    public Widget getWidget(Folder model, String property, ColumnData config, int rowIndex, int colIndex,
                            ListStore<Folder> store, Grid<Folder> grid) {
        
        String style = model.get(property) == true ?  "color: red" : "color:blue";
    
    
        final StringBuilder html = new StringBuilder("<div style='" + style + "'>" + 10 + "</div>);
        final Html l = new Html(html.toString());
        return l;
    }
    };

  3. #3
    Sencha User
    Join Date
    Dec 2011
    Posts
    1
    Vote Rating
    0
    lindajacquelyn is on a distinguished road

      0  

    Default TreeGrid text style

    TreeGrid text style


    that's really an interesting topic to talk about and please give more suggestions

  4. #4
    Sencha User
    Join Date
    May 2010
    Posts
    5
    Vote Rating
    0
    Quartilan is on a distinguished road

      0  

    Default


    what do you need? Or is this yet another bot? :-)

  5. #5
    Sencha User
    Join Date
    Sep 2008
    Location
    Italy
    Posts
    11
    Vote Rating
    0
    _sandro_ is on a distinguished road

      0  

    Default


    Thank you, the solution code you proposed here works fine!

    Sandro

Thread Participants: 2

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