Be sure your post includes:
SmartGWT 2.2-2.3 nightly downloaded 08262010
Firefox 3.6.12 in Development Mode
I have a DynamicForm that holds 4 Item objects 1 TextItem, 2 DateTimeItem's and a ButtonItem.
The user will enter a random alphanumeric text in the first and select a date/time from the start and end datetime fields then click on "Create Keycode" this should then take those values and create a ListGridRecord and add it to our ListGrid.
If I use a DataSource client side only no data is added to the ListGrid, no errors, nothing.
If I use ListGridFields and only enter the keycode the Keycode is added as a new record to the ListGrid, if I enter either DateTimeItem then the record doesn't show.
	
							
						
					SmartGWT 2.2-2.3 nightly downloaded 08262010
Firefox 3.6.12 in Development Mode
I have a DynamicForm that holds 4 Item objects 1 TextItem, 2 DateTimeItem's and a ButtonItem.
The user will enter a random alphanumeric text in the first and select a date/time from the start and end datetime fields then click on "Create Keycode" this should then take those values and create a ListGridRecord and add it to our ListGrid.
If I use a DataSource client side only no data is added to the ListGrid, no errors, nothing.
If I use ListGridFields and only enter the keycode the Keycode is added as a new record to the ListGrid, if I enter either DateTimeItem then the record doesn't show.
Code:
	
	//Form
final DynamicForm formKeycodeModal = new DynamicForm();
final TextItem txtKeycodeVal = new TextItem("keycodeVal", "Enter Keycode Value");
final DateTimeItem startKeycodeDate = new DateTimeItem("startKeycodeDate", "Keycode Start");
final DateTimeItem endKeycodeDate = new DateTimeItem("endKeycodeDate", "Keycode End");
final ButtonItem biCreateKeycode = new ButtonItem("btnCreateKeycode", "Create Keycode");
formKeycodeModal.setFields(txtKeycodeVal, startKeycodeDate, endKeycodeDate, biCreateKeycode);
//ListGrid to put the values into 
final ListGrid keycodesLGW = new ListGrid();  
keycodesLGW.setWidth("100%");  
keycodesLGW.setHeight("38%");  
keycodesLGW.setLeft(350);  
keycodesLGW.setShowAllRecords(true);  
keycodesLGW.setEmptyMessage("Rows Added Here");  
//I've also tried just using ListGridField's and the Keycode gets placed into our ListGrid but if I enter DateTimes it doesn't
DataSource ds = new DataSource();
ds.setFields(
		new DataSourceTextField("keycode", "Keycode"),
		new DataSourceDateTimeField("startdt", "Start Date"),
		new DataSourceDateTimeField("enddt", "End Date")
	);
ds.setClientOnly(true);
keycodesLGW.setDataSource(ds);
//Once Create button is clicked capture our values and create our ListGridRecord then add it to our ListGrid
biCreateKeycode.addClickHandler(new ClickHandler() {
			
			@Override
			public void onClick(ClickEvent event) {
				//Get existing records and add a new one then set it back on our table
				
				ListGridRecord tmp = new ListGridRecord();
				Object code = txtKeycodeVal.getValue();
				if(code != null) {
					tmp.setAttribute("keycode", code);
					Object start = startKeycodeDate.getValue();
					if(start != null) {
						tmp.setAttribute("startdt", start);
					}
					Object end = endKeycodeDate.getValue();
					if(end != null) {
						tmp.setAttribute("enddt", end);
					}
					keycodesLGW.addData(tmp);
				}
				else {
					SC.say("You must enter a keycode value");
				}
				
			}
		});

Comment