/* * Isomorphic SmartGWT web presentation layer * Copyright 2000 and beyond Isomorphic Software, Inc. * * OWNERSHIP NOTICE * Isomorphic Software owns and reserves all rights not expressly granted in this source code, * including all intellectual property rights to the structure, sequence, and format of this code * and to all designs, interfaces, algorithms, schema, protocols, and inventions expressed herein. * * If you have any questions, please email
. * * This entire comment must accompany any portion of Isomorphic Software source code that is * copied or moved from this file. */ package com.smartgwt.sample.showcase.client.shuttles; import com.smartgwt.client.data.DataSource; import com.smartgwt.client.widgets.Canvas; import com.smartgwt.client.widgets.grid.ListGrid; import com.smartgwt.client.widgets.form.fields.MultiPickerItem; import com.smartgwt.client.widgets.grid.ListGridField; import com.smartgwt.client.types.MultiPickerSelectionStyle; import com.google.gwt.core.client.EntryPoint; public class InlineShuttleSample implements EntryPoint { @Override public void onModuleLoad() { DataSource ds = DataSource.get("teams_relation"); ListGrid teamsGrid = new ListGrid(); teamsGrid.setDataSource(ds); teamsGrid.setWidth100(); teamsGrid.setHeight100(); teamsGrid.setAutoFetchData(true); teamsGrid.setCanEdit(true); ListGridField teamNameField = new ListGridField("TeamName"); ListGridField employeeIdField = new ListGridField("EmployeeId"); employeeIdField.setCanEdit(true); //employeeIdField.setEditorType("MultiPickerItem"); MultiPickerItem editorProperties = new MultiPickerItem(); editorProperties.setSelectionStyle(MultiPickerSelectionStyle.SHUTTLE); employeeIdField.setEditorProperties(editorProperties); teamsGrid.setFields(teamNameField, employeeIdField); teamsGrid.draw(); } }