package com.include.project.client;

import com.google.gwt.core.client.EntryPoint;
import com.smartgwt.client.data.DataSource;
import com.smartgwt.client.types.ListGridEditEvent;
import com.smartgwt.client.widgets.grid.ListGrid;
import com.smartgwt.client.widgets.grid.ListGridField;
import com.smartgwt.client.widgets.layout.VLayout;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Include implements EntryPoint {

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {
		final ListGrid listGrid = new ListGrid();  
        listGrid.setDataSource(DataSource.get("Manifest"));
//        listGrid.setDataSource(DataSource.get("cityIncludeFromSQL"));  
        listGrid.setWidth(700);  
        listGrid.setHeight(224);  
        listGrid.setShowFilterEditor(true);  
        listGrid.setAlternateRecordStyles(true);  
        listGrid.setAutoFetchData(true);  
        listGrid.setDataPageSize(50);  
        listGrid.setCanEdit(true);  
        listGrid.setEditEvent(ListGridEditEvent.CLICK); 
        listGrid.setFields(new ListGridField("EmployeeName"),
        		new ListGridField("SubContractorName"),
        		new ListGridField("LastEdited"));
//        listGrid.setFields(new ListGridField("cityName", "City"),  
//                new ListGridField("countryName", "Country"),  
//                new ListGridField("continent", "Continent"));  
  
        VLayout layout = new VLayout(15);  
        layout.addMember(listGrid);  
  
        layout.draw();  
	}
		
}
