jsgrid
jsgrid copied to clipboard
How can I call default rowRenderer from a custom rowRenderer ?
Help Request/Question I would like to use custom rowRenderer only when the page width is less than a defined limit.
rowRenderer: function(item) {
if(screen.width < 800){
customString = 'example';
return $("<tr>").append($("<td>").append(customString);
}else{
//call default function
return ...
}
},
Thank you
I'm trying something like this:
rowRenderer: function(item, itemIndex) { if(screen.width < 800){ //custom render }else{ //call default function $result = $("<tr>"); this._renderCells($result, item); return $result; } },