I have some trouble.
My grid generates from datasource (XJSONDataSource)
And I'd like to have depended selectboxes in it. I'm reading showcase examples and write my code.
So, I read http://www.smartclient.com/smartgwt/...t_selects_grid
and I was trying:
A part of code from TaskDS:
But departmentField and even fields is always null.
Where is my mistake?
My grid generates from datasource (XJSONDataSource)
Code:
TaskDS taskDS = TaskDS.getInstance(); grid.setDataSource(taskDS);
So, I read http://www.smartclient.com/smartgwt/...t_selects_grid
and I was trying:
Code:
ListGridField[] fields = grid.getFields(); // for test ListGridField departmentField = grid.getField("department"); department.addChangedHandler(new ChangedHandler() { @Override public void onChanged(ChangedEvent event) { grid.clearEditValue(event.getRowNum(), "assignedTo"); } });
Code:
DataSourceField assigneddepartment = new DataSourceField("department", FieldType.TEXT, "Department");
Where is my mistake?