Dec 04, 2014, 9:07 AM
[CLOSED] GroupHeaderTpl && date
Hello good.
I'm trying to apply a date format to a group and can not.
I have tried the following.
Thank you very much.
I'm trying to apply a date format to a group and can not.
I have tried the following.
XTemplate tpl = new XTemplate()
{
ID = "XTemplate1"
};
tpl.Html = "<tpl if=\"groupField === 'DueDate'\">" +
"{columnName}: {[Ext.util.Format.date(values.rs[0].data.DueDate, 'Y/m/d')]}" +
"<tpl else>" +
"{columnName}: {name} ({[values.rows.length]} {[values.rows.length > 1 ? 'Tareas' : 'Tarea']})" +
"</tpl>";
Grouping g = new Grouping();
g.GroupHeaderTpl = tpl;
//otherwise
XTemplate tpl = new XTemplate()
{
ID = "XTemplate1"
};
tpl.Html = "<tpl if=\"groupField === 'DueDate'\">" +
"{columnName}: {[Ext.util.Format.date(name, 'Y/m/d')]}" +
"<tpl else>" +
"{columnName}: {name} ({[values.rows.length]} {[values.rows.length > 1 ? 'Tareas' : 'Tarea']})" +
"</tpl>";
Grouping g = new Grouping();
g.GroupHeaderTpl = tpl;
Thank you very much.
Last edited by Daniil; Dec 04, 2014 at 9:54 AM.
Reason: [CLOSED]