public ExtScript() {
			Console.WriteLine("ExtScript()");

			var record = Record.create(new Schema[] {
			    new Schema { name = "id", type = "int" },
			    new Schema { name = "value" }
			});

			JsonReader reader = new JsonReader(new JsonReaderConfig {
				id = "id"
			}, record);
			Console.WriteLine(reader);

			Store store = new Store(new StoreConfig {
				reader = reader
			});

			var data = new MyRecord[] {
			    new MyRecord { id = 1, value = "first" },
			    new MyRecord { id = 2, value = "second" }
			};
			Console.WriteLine(data);
			store.loadData(data);

			ColumnModelConfig[] columns = new ColumnModelConfig[] {
			    new ColumnModelConfig {
			        dataIndex = "id", header = "ID"
			    },
			    new ColumnModelConfig {
			        dataIndex = "value", header = "Value"
			    }
			};

			var colModel = new ColumnModel(columns);

			this.grid = new GridPanel(new GridPanelConfig {
				height = 150.0,
				renderTo = "grid",
				colModel = colModel,
				store = store
			});
			Console.WriteLine(this.grid);

			this.grid.on("dblclick", new GridPanelDblclickDelegate(this.OnDblClick), this);
			Console.WriteLine("ready");
		}
Exemple #2
0
 public ColumnModel(ColumnModelConfig config) { }
Exemple #3
0
 public PropertyColumnModel(ColumnModelConfig config) { }
Exemple #4
0
 public ColumnModel(ColumnModelConfig config) { throw new Exception(); }