Jquery-Easyui的combogrid怎么设置默认值
展开全部
您好,很高兴为您解答,解决办法如下:
$('#id').combogrid('grid').datagrid('selectRecord',idValue)
其中id为combogrid的id值,idValue对应combogrid定义的idValue属性
$('#areaID').combogrid({
onLoadSuccess: function(){
var id = parseInt($('#areaID1').val());
$('#areaID').combogrid('grid').datagrid('selectRecord',id);
}
});
$('#pid').combogrid({
onLoadSuccess: function(){
for(var id in parseInt($('#pid1').val().split(',')))
{
alert(id);
$('#pid').combogrid('grid').datagrid('selectRecord',id);
}
}
});
$('#id').combogrid('grid').datagrid('selectRecord',idValue)
其中id为combogrid的id值,idValue对应combogrid定义的idValue属性
$('#areaID').combogrid({
onLoadSuccess: function(){
var id = parseInt($('#areaID1').val());
$('#areaID').combogrid('grid').datagrid('selectRecord',id);
}
});
$('#pid').combogrid({
onLoadSuccess: function(){
for(var id in parseInt($('#pid1').val().split(',')))
{
alert(id);
$('#pid').combogrid('grid').datagrid('selectRecord',id);
}
}
});
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询