In JQGrid, Is it possible to use different formatter on grouping summary cell other than column formatter?

后端 未结 2 1125
闹比i
闹比i 2020-11-29 06:58

is it possible to use different formatter for the data rows and the summary row? forexample, I want to add a summary info (summaryType= count) to a checkbox formatted column

2条回答
  •  北荒
    北荒 (楼主)
    2020-11-29 07:48

    are you using a custom formatter? what you can do is make a custom formatter to display different things based on the input. I'm not sure if you are returning true or false as your input but something liek this should work:

    function checkboxFormatter(cellvalue,options,rowObject){
         if(typeof cellvalue == "number"){
              return cellvalue;
         }
         else if(cellvalue == "true"){
              return '';
         }
         else{
              return '';
         }
    }
    

    let me know if you have questions or if this is different then what you are thinking

提交回复
热议问题