msflexgrid - Wijmo dual formatting of one column -


in wijmo flexgrid, in 1 dropdown column having dropdown values (decimal, percentage). need show percentage symbol if choose percentage dropdown values, , decimal (n2) if dropdown value selected decimal

you need set format of column based on value using itemformatter or formatitem event. here fiddle demonstrating similar requirement: http://jsfiddle.net/5ltfpzst/

 grid.itemformatter = function (panel, r, c, cell) {         if (panel.celltype === wijmo.grid.celltype.cell && c == 3) {              var celldata = panel.getcelldata(r, 0);             if (celldata < 5) {                 panel.columns[c].format = 'n1';             } else {                 panel.columns[c].format = 'p0';             }         }     } 

Comments

Popular posts from this blog

javascript - Using jquery append to add option values into a select element not working -

Android soft keyboard reverts to default keyboard on orientation change -

jquery - javascript onscroll fade same class but with different div -