If you wish to set the 'on' and 'off' values on the 'switchbutton' editor, please try the code below:
<script type="text/javascript">
$.extend($.fn.datagrid.defaults.editors, {
switchbutton:{
init: function(container, options){
var input = $('<input>').appendTo(container);
input.switchbutton(options);
return input;
},
getValue: function(target){
return $(target).switchbutton('options').checked ? 'on' : 'off';
},
setValue: function(target, value){
$(target).switchbutton(value=='on'?'check':'uncheck');
},
resize: function(target, width){
$(target).switchbutton('resize', {width: width,height:22});
}
}
})
</script>