우선 css를 하나 선언해줍니다. 저는 간단하기 background 컬러만 바꿔볼꺼에요.


1
2
3
4
5
<style>
.input_newColor {
    background-color : #ffff99;
}
</style>
cs


이제 jQgrid 선언 부분에 행이 선택되었을 때 셀이 어떻게 바뀌는지 설정을할 차례입니다.


1
2
3
4
5
6
7
8
9
10
11
12
13
14
// 스크립트 맨 위에
var lastsel; // 선언해줍니다.
 
onSelectRow : function(rowID, iRow, iCol, e) {
     // 행선택 시 자동으로 수정모드가 되게 바뀌게해줍니다.
    if(rowID && rowID!== lastsel){
        $('#table').jqGrid('restoreRow', lastsel);
        $('#table').jqGrid('editRow',rowID,true);
        lastsel=rowID;
    }
    // 선택한 행의 tr태그를 가져옵니다.
    var tr = $(this).jqGrid("getInd", rowID, true);
    $(this).find("input[name=원하는cell의이름]").addClass("input_newColor");
}
cs


주석으로 설명했으니 따른 부연설명은 생략!