반응형

--- <html> ---

<select id="selectInfo" name="selectInfo">

<option value="test1">abc</option>

<option value="test2">def</option>

</select>


--- <js> ---

function resultFormatter(cellvalue, options, rowObject){

var result = "";

$('#selectInfo > option').each(function(){

if(cellvalue.toString() == $(this).val(){

result = $(this).text();

}

});

return result;

}


function에 cellvalue, options, rowObject가 들어가 있는 것은 jqGrid에서 사용하는 것이기 때문에 들어가 있는 것이고 상황에 맞게 응용해서 사용하면 도움이 될 것으로 예상됩니다.

반응형

+ Recent posts