So I was trying to add grid binding to an already finished grid that has string and date values. Example: http://www.sencha.com/examples/#ExamplePlace:gridbinding
╔═════════╦═════════════════════╗
║ room ║ date/time ║
╠═════════╬═════════════════════╣
║ L1-0056 ║ 25.02.2014 06:23:16 ║
║ L2-0061 ║ 25.02.2014 08:54:31 ║
╚═════════╩═════════════════════╝
Room: ComboBox with room values
Date/Time: Either DatePicker
+ some self-made TimePicker
, or some DateTimePicker
library... (getting the gxt-datepicker to work was easy, but I also need to edit the time)
Getting the date values into the editor and vice versa doesn't seem to be the problem (aside from the fact that I also need to edit the time).
There isn't any DateTimePicker
in gxt, right? So... how do I define 2 editor fields for one cell in a grid?
Also: using a TextBox
to edit the string in the first column works fine, but how can I use a ComboBox
as editor?
As an alternative, I used inline-editing: http://www.sencha.com/examples/#ExamplePlace:inlineeditablegrid
In this case, everything works fine. Except the fact, that I still cannot edit the time in the date field with given picker. Not sure what method to pick here (either inline editor or binding) - but on both I cannot figure out how to edit the time-part in the date field, any ideas?
Either one is fine, as long as I get the editing to work.
[edit] the datetime picker part may be answered (thanks :) ), gotta give it a try - any ideas about the combobox-binding?
I would recommend GWT-Bootstrap's DateTimePicker
at http://gwtbootstrap.github.io/#component:datetimepicker
It brings up a time picker after the date has been selected:
As you say, there doesn't seem to be an equivalent in GXT.
I'd say you are better off with one widget so if you don't want to use another 3rd-party library then you'll have to roll your own composite widget.