Hello,
I make my way step by step... My window works fine now, another question now
I have a grid with this code (simplified)
Cispeo.grid.Projects = function(config){
config = config || {};
Ext.applyIf(config,{
id: 'cispeo-grid-projects',
url: Cispeo.config.connector_url,
baseParams: {
action: 'mgr/project/getlist',
company: config.company
},
fields:['id','owner','name','start_date_plan','start_date_real','end_date_plan','end_date_real','status','deleted'],
autoHeight: true,
paging: true,
remoteSort: true,
autosave: false,
primaryKey: ('id'),
stripeRows: true,
columns: [{
header: _('id'),
dataIndex: 'id',
width: 20
},{
header: _('cispeo.project_owner'), // this column is filled in by the combobox
dataIndex: 'owner',
width: 40
},{
header: 'owner_name', // in this colum I'd like to display 'company.name (company.office)'
dataIndex: 'owner',
width: 200,
renderer: this.renderCompany // don't know how !!!
},{
header: _('name'),
dataIndex: 'name',
width: 150
}
[... etc...]
In my previous post, I fill the column ’owner’ via a combo-box in a window, the column is filled with the (Company) owner’s ID.
I’d would like in the column ’owner_name’ to display the name and the office name for the Company. If I understand correctly I have to specify a renderer (renderCompany) but I can’t figure how to load and display the correct data (the right name and office). I don’t feel very comfortable with ExtJS...
I suppose I have to ’load’ a hidden store with the companies data (may be the grid ’companies’ that is displayed in an other tab? ) and have to lookup through it to find the infos for the ID provided by ’owner’ column ... But how?
Of course I have 2 classes in my schema, (Company and Project where Project.owner = Company.id)...
I need some guidance on this...
Thanks