Grid view and userdata

Hi,
I was wondering if it was possible to have user data to show-up in the grid view of the scheduler. If i configure my event to have extra field like “note” for example, how can I have 'note" column to show-up in the Grid view? it seems all i can show is id, text, date?

let me know,

thanks
Sylvain

Hi,
the displayed columns are defined by a grid configuration object, one that is passed into scheduler.createGridView method.
docs.dhtmlx.com/scheduler/grid_v … ialization
docs.dhtmlx.com/scheduler/grid_v … atemplates

perfect! Thanks, actually it work for the extra fields, but when using the following:

var employees =[
            { key: 1, label: "Employee Name" },
];
scheduler.createGridView({
            name:"grid",
            fields:[
                {id:"text",   label:'Action', width:'*',  align:'right',  sort:'str'},
                {id:"employee_id", label:'Employee Name',     width:100},
                {id:"note", label:'note',     width:100},
                {id:"date",     label:'Time',      width:200,  align:'left',   sort:'int'}
            ],
            rowHeight:32,
            paging:true
        });

how can I show the employee name instead of id, right now it just shows the id?
thanks

Hi,

just add an extra field “employee_name” in your event (as you did for “note”) and link a column to it.

You can also define a template function for a cell content. The template may retreive and return employee name by id
docs.dhtmlx.com/scheduler/grid_v … atemplates