URDINESH: FORMAT COLUMN
Showing posts with label FORMAT COLUMN. Show all posts
Showing posts with label FORMAT COLUMN. Show all posts

Saturday, August 16, 2014

HOW TO FORMAT COLUMN IN KENDO GRID


Hi All,

We can use Client Template to display formatted data fields in Kendo Grid columns.

 Use the following syntax this,

ClientTemplate("#= kendo.toString(DataField, 'Format String') #");

Example:

To Display currency with Dollar Sign
ClientTemplate("#= kendo.toString(Amount, 'c') #");

To Display Date in dd/MM/YYYY format

ClientTemplate("#= kendo.toString(DOBDate, 'dd/MM/yyyy') #");

To Display Decimal with 2 digits

ClientTemplate("#= kendo.toString(totalUnits, 'n2') #");

Note:

Here I am giving Data field with preceding its object name. 

Followers