Wijmo dual formatting of one column

By : S.L.
Source: Stackoverflow.com
Question!

In my Wijmo FlexGrid, in one Dropdown Column having dropdown values (decimal, Percentage). I need to show percentage symbol if I choose percentage as dropdown values, and decimal (n2) if Dropdown value is selected decimal

By : S.L.


Answers

You need to set the format of the column based on the value using itemFormatter or formatItem event. Here is a 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';
            }
        }
    }
By : Ashish


This video can help you solving your question :)
By: admin