如果name相同,radio就只有最后一行能默认选中,把name去掉,radio就可以被默认选中,但是不能实现单选
<th data-options="field:'orgtype',width:80,formatter:formatProgress">类型</th>
function formatProgress(value,row){
if(value=='1'){
var s = '<input type="radio" value="1" checked="true">分行'+
'<input type="radio" value="2">支行'+
'<input type="radio" value="3">网点';
}
else if(value=='2'){
var s = '<input type="radio" value="1" >分行'+
'<input type="radio" value="2" checked="true">支行'+
'<input type="radio" value="3">网点';
}
else if(value=='3'){
var s = '<input type="radio" value="1" >分行'+
'<input type="radio" value="2" >支行'+
'<input type="radio" value="3" checked="true">网点';
}
else{
var s = '<input type="radio" value="1" >分行'+
'<input type="radio" value="2" >支行'+
'<input type="radio" value="3" >网点';
}
return s;
}
问题表述不清晰,只能说根据我理解的,你可以把他们放到不同function 或者加上不同的标识符
属性啊 checked="checked"
checked="true"是什么gui
楼主先去搞清楚radio干嘛用的和自己到底要干嘛先,同名name只有一个能选择,只有最后出现的radio包含checked被选中。