
gridgetSelectionModel()selectRow(index_); 选择一行
gridgetView()focusRow(index_); 设置一行高亮
使用回调函数对 年假字段赋值
var holidayType= new ExtformComboBox({store: new ExtdataSimpleStore({ fields : ['value', 'text'],
data:[['0','事假'],['1','病假'],['2','年假']] }),
fieldLabel: '性别',
displayField: 'text',
valueField: 'value',
triggerAction: 'all',
allowBlank: false,
width:86,
editable: false,
mode: 'local',
listeners:{
select: function (){
var comb=this;
if (thisgetValue()=="年假"){
ExtAjaxrequest({
url: url,
method: 'POST',async : false,scope: this,
params: params,
success: function(response, options) {
//alert(responseresponseText);
var rsInfo = ExtutilJSONdecode(responseresponseText);
var haveDays= combownerCtgetComponent('havDays')
//注意这里的引用方式
if(rsInfosuccess){
haveDayssetValue(rsInfodata);
}else{
}
}),
}
},
},
}
});
var havDays= new ExtformNumberField ({name:'havDays', itemId:'havDays',
fieldLabel: '年假剩余天数',
value:0, });
确保在store load完成后set 默认值在此句后newcomboxsetValue(1); newcomboxfireEvent('select',newcombox); 具体fireEvent使用可参见API
用ActiveXObject("MicrosoftXML>
以上就是关于ext中代码 grid.getSelectionModel().selectRow(index_); grid.getView().focusRow(index_); 是什么意思全部的内容,包括:ext中代码 grid.getSelectionModel().selectRow(index_); grid.getView().focusRow(index_); 是什么意思、Extjs项目中接收json数据点击某个下拉框实现回显数据、Ext.form.ComboBox 设置默认值能触发select事件的问题等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)