Hi,
I'm trying to get DetailViewer to show the detail field from a datasource. Here is the code.
I set lastName to be a detail field, but it doesn't show on DetailViewer.
Please help.
I'm trying to get DetailViewer to show the detail field from a datasource. Here is the code.
Code:
DataSourceTextField firstName = new DataSourceTextField("firstName", "First Name"); DataSourceTextField lastName = new DataSourceTextField("lastName", "Last Name"); lastName.setDetail(true); DataSource ds = new DataSource(); ds.setClientOnly(true); ds.setFields(firstName, lastName); DetailViewer viewer = new DetailViewer(); viewer.setDataSource(ds); viewer.setUseAllDataSourceFields(true); ListGridRecord data = new ListGridRecord(); data.setAttribute("firstName", "John"); data.setAttribute("lastName", "Smith"); viewer.setData(data); viewer.draw();
Please help.