I have a a gridpanel
that has the following fields:
Name ID Address Home_Phone Cell
Some records that return to the store may not have any data for some of these fields, rather then display an empty column for that record in the grid I would like to show a default value of N/A
.
So I would have
Name ID Address Home_Phone Cell
Shaun 2 My Address N/A N/A
Rather then:
Name ID Address Home_Phone Cell
Shaun 2 My Address
I know of two ways to do this:
- In the back end if the field doesn't exists return a "N/A" for that column in the JSON.
- Create a template with a method that check if the record doesn't contain the value return "N/A".
My question is, is there an easier way to tell the grid
column if no value is found in the record display the default N/A
?