MarcinP
26 Oct 2008, 6:54 AM
Hi,
I'm trying to add TimeField to EditorGrid. Is it possible? because it doesn't work in my case.
My code:
ColumnConfig to = new ColumnConfig() {
{
setId("to");
setHeader("Do godziny");
setWidth(65);
setSortable(false);
setDataIndex("to");
setDateTimeFormat(DateTimeFormat.getShortTimeFormat());
setEditor(new CellEditor(new TimeField() {
{
setFormat(DateTimeFormat.getShortTimeFormat());
setIncrement(15);
}
}));
}
};
When I try to choose time I get an exception:
[ERROR] Uncaught exception escaped
java.lang.ClassCastException: java.util.Date cannot be cast to com.extjs.gxt.ui.client.data.ModelData
at com.extjs.gxt.ui.client.widget.form.ComboBox.setValue(ComboBox.java:1)
Thanks for help.
Regards,
Marcin
I'm trying to add TimeField to EditorGrid. Is it possible? because it doesn't work in my case.
My code:
ColumnConfig to = new ColumnConfig() {
{
setId("to");
setHeader("Do godziny");
setWidth(65);
setSortable(false);
setDataIndex("to");
setDateTimeFormat(DateTimeFormat.getShortTimeFormat());
setEditor(new CellEditor(new TimeField() {
{
setFormat(DateTimeFormat.getShortTimeFormat());
setIncrement(15);
}
}));
}
};
When I try to choose time I get an exception:
[ERROR] Uncaught exception escaped
java.lang.ClassCastException: java.util.Date cannot be cast to com.extjs.gxt.ui.client.data.ModelData
at com.extjs.gxt.ui.client.widget.form.ComboBox.setValue(ComboBox.java:1)
Thanks for help.
Regards,
Marcin