Quantcast
Viewing all articles
Browse latest Browse all 3184

How to use formatter in a table??

Hi experts,

 

I want to make a field in a table coloured, So please guide me how to use formatter for a table field?

 

 

Piece of code that I have used for list formatter is like:

   firstStatus: [
              {
  
   text:"{DeliveryStatus}",
   state:{
   path:"DeliveryStatus",
   formatter: function(id)
                  {
                  if(id == "Shipped")
                  {
                  return "Success"
                  }
                  if(id  == "Not Shipped")
                  {
                  return "Error"
                  }
                  if(id == "In Process")
                  {
                  return "Warning"
                  }
                  }}}
   ]
     
     
           
     

});

 

 

 


Viewing all articles
Browse latest Browse all 3184

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>