ExtJs FieldSet

1659 단어
var type = [ [ ' ', 1 ], [ ' ', 2 ] ];

	var storeType = new Ext.data.SimpleStore({
		fields : [ 'text', 'value' ],
		data : type
	});

	var comboType = new Ext.form.ComboBox({
		store : storeType,
		emptyText : ' ',
		mode : 'local',
		hiddenName : "value",
		triggerAction : 'all',
		valueFeild : 'value',
		displayField : 'text',
		selectOnFocus : true,
		redOnly : true
	});

	var myfieldset = new Ext.form.FieldSet(
			{
				title : ' ',
				width : 500,
				height : 70,
				layout : 'column',
				border : true,
				labelWidth : 20,
				anchor : '100%',

				items : [
						{
							columnWidth : 0.33,
							layout : 'form',
							border : true,
							items : [ comboType ]
						},
						{
							columnWidth : 0.33,
							layout : 'form',
							border : true,
							items : [ {
								xtype : 'button',// Ext , form 
								text : ' ',
								height : 24,
								width : 50,
								handler : function() {
									if (formpanel.getForm().isValid()) {
										var comvalue = comboType.getValue();
										if (comvalue == " ") {
											var values = 1;
										} else
											values = 2;

										grid.getStore().proxy.conn.url = "ViewNetworkseninfo?value="
												+ values;

										grid.getStore().load();

									}

								}
							} ]
						} ]
			});

	var formpanel = new Ext.form.FormPanel({
		height : 90,
		border : false,
		labelAlign : 'right',
		frame : true,
		items : myfieldset
	});
	this.add(formpanel);

좋은 웹페이지 즐겨찾기