2

I have a grid which displays data from database, sometimes some cells are empty because there is no data in that column in database. and sometimes the data is "undefined". So I need to show this text "No Data" in these two cases in the grid. I read that I can do it with the renderer but still can't figure out how.

sra
  • 23,820
  • 7
  • 55
  • 89
Noon
  • 1,181
  • 6
  • 20
  • 38

1 Answers1

8

Apply a renderer to that gridcolumn like

renderer: function(val) {
    if (val === null || val === undefined)
        return 'No Data';
    return val;
}

Here's a JSFiddle

sra
  • 23,820
  • 7
  • 55
  • 89