2009-10-28 8 views

Répondre

1

est d'écrire formatter personnalisée: http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_formatter

function checkBoxFormatter(cellvalue, options, rowObject) 
{ 
    if (rowObject. amount > 50) { 
    //return disabled checkbox string 
    }else{ 
    //return enabled checkbox string 
    } 
    return new_format_value 
} 

et lors de la construction jqGrid:

jQuery("#grid_id").jqGrid({ 
... 
    colModel: [ 
     ... 
     {name:'checkbox', index:'checkbox', width:60, align:"center", formatter:checkBoxFormatter}, 
     ... 
    ] 
... 
}) 
Questions connexes