이런거 내 요구에 딱 맞게 쓰려면 firebug 열어서 jqgrid 만들어진 html 소스 까보면서 해야 하는데
구글링에 나와줘서 시간 벌었다.
http://stackoverflow.com/questions/8552303/jqgrid-radio-button-select-single-row
마지막 답변에 보면 코드도 적어놓았고
See the demo which demonstrate this ~ 라고... 샘플 구현 링크도 적어놓았음.
jqgrid 로 장착한 제품을 파는 업체 사이트 같은데서 올린거 같은데... 착하네...^^
근데 영업목적인가? 저런 답글 올린다고 영업이 더 되려나... 암튼^^
아래는 내 소스임. 굳이 볼 필요없고 위에 링크들 보고 하면 되는데... 그냥 적어놓겠음
colModel :[
{name: 'sfstDocuId', index: 'sfstDocuId', width: 40, align: 'center', editable:false, edittype:"radio"
, sortable:false
, classes:'pss-jqgrid-pointer-nodecoration'
, formatter: function (cellValue, option) {
return '<input type="radio" name="radio_' + option.gid + '" />';
}
},
.............................
,beforeSelectRow: function (rowid, e) { var $radio = $(e.target).closest('tr').find('input[type="radio"]'); $radio.attr('checked', 'checked'); return true; // allow row selection }
'♣ Tech & Biz Salon > Tech' 카테고리의 다른 글
내 돈으로 산 첫번째 노트북 (Asus 젠북 11.6인치) (0) | 2012.11.20 |
---|---|
이클립스 느낌표, X 아이콘 지우기 / SVN 아이콘 설명 (0) | 2012.11.16 |
html에서 file protocol 링크는 동작하지 않는다 (0) | 2012.11.15 |