Skip to content Skip to sidebar Skip to footer

Kendo Ui Grid Created On Fly Using Javascript

I have one of the grid column called Action Links and it shows data as JSON format as follows: {'Id' : '1', 'Flag1': '1', 'Flag2': '1'} {'Id' : '2', 'Flag1': '1', 'Flag2': '1

Solution 1:

If I understood correctly you want your kendo grid to have a conditional display on a particular column; if so on your grid declaration:

... , {
           field: "Flag1",
           title: "Flag",
           template: function (dataItem) {
               var value = dataItem. Flag1;

               if (!value || value === 1) {
                   return'image/html here';
               }
               return"something else";
           },

       }, { ..

Kendo Grid uses template function to conditionally display content in a a column

Post a Comment for "Kendo Ui Grid Created On Fly Using Javascript"