Discuss anything related to web development but no technical support questions


Post by afiume »

Hi guys,

i necessity to modify the style of tree record in 'eventRenderer'.

How i can do this?
Which class/template source i can modify?

Thanks,

Tony

Post by afiume »

if this is my eventRenderer, how i can modify the style of record in a tree?
eventRenderer: function (taskRecord, r, tplData, row, col, ds) {}

Post by arcady »

The eventRenderer method is used for rendering tasks in the right part of the gantt panel (so called scheduling view).
And if you want to customize your left side (so called locked grid) columns you can use normal ExtJS renderer config.

Post by afiume »

arcady wrote:The eventRenderer method is used for rendering tasks in the right part of the gantt panel (so called scheduling view).
And if you want to customize your left side (so called locked grid) columns you can use normal ExtJS renderer config.
thanks for the reply :)

Can i do Gantt.lockedGrid.[...] to get the record name and customize the cls?

Thanks

Post by arcady »

The renderer receives as its arguments value, metaData (which can be used for CSS styling) and record.

Post by afiume »

arcady wrote:The renderer receives as its arguments value, metaData (which can be used for CSS styling) and record.
ok,

but i dont understand how use this render.

Where i must put this code?
 renderer: function(value){
     
    }
If i include the code in Gantt create, not work.

 g = Ext.create('Gnt.panel.Gantt', {

renderer: function(value){
     
    }

[...]
}

Post by afiume »

Cani do override?
          Ext.define('Override.Ext.tree.Panel', {
            override: 'Ext.tree.Panel',


            });

Post by arcady »

The renderer is a config of column. As far as I understand you are trying to customize columns look?
...
                {
                    xtype       : 'treecolumn',
                    dataIndex   : 'Name',
                    renderer    : function (value, meta, record) {
                        // here we assign some class
                        meta.tdCls = 'custom-style';
                        return value;
                    }
                }
...

Post by afiume »

arcady wrote:The renderer is a config of column. As far as I understand you are trying to customize columns look?
...
                {
                    xtype       : 'treecolumn',
                    dataIndex   : 'Name',
                    renderer    : function (value, meta, record) {
                        // here we assign some class
                        meta.tdCls = 'custom-style';
                        return value;
                    }
                }
...
i nencessity to modify the style of children, father in the tree

Post by afiume »

Perfect,

whit this render i can manage the colums:
  treeRenderer: function (value, metaData, record, rowIdx, colIdx, store, view) {[...]}
Where is the info about checked column? If the column checked is false i can modify the style :)

Post Reply