jQWidgets Forums

Forum Replies Created

Viewing 1 post (of 1 total)
  • Author
    Posts

  • kadursandy
    Participant

    Thanks!. I am sorry my question was not very specific.

    I need to apply localization on specific columns not whole grid. I am using cellsformat: ‘c2’, columntype: ‘numberinput’ , always $ is displayed.
    Few columns in need $ , Rs and NO symbol to be displayed Eg: for Exchange Rate(number input is required with 2 decimal places input).

    I have editable columns in the grid which has both currencies. Eg: Column Unit Price $10.00(in dollars) and need to converted to India Rs Eg: Column Unit Price in INR(Rs600.00) and Duty Percentage(Eg: 10%). I use numberinput also with cellsformat(c2)

    Currently displays $ symbol, I don’t require any dollar symbol. But I need the numberinput 00.00 for in-putting with 2 decimal places.
    { text: ‘Exch Rate’, datafield: ‘exch_rate’, width: 80, cellsalign: ‘right’, cellsformat: ‘c2’, columntype: ‘numberinput’,
    validation: function (cell, value) {
    if (value < 0 || value > 100) {
    return { result: false, message: “Exch rate should be 0-100” };
    }
    return true;
    },
    createeditor: function (row, cellvalue, editor) {
    editor.jqxNumberInput({ digits: 3 });
    }
    },

    Require: Rs in the display
    { text: ‘INR Value’, datafield: ‘inr_val’, width: 80, cellsalign: ‘right’, cellsformat: ‘c2’, columntype: ‘number’,
    cellsrenderer: function (index, datafield, value, defaultvalue, column, rowdata) {
    var total = 1000; //(some calculation is done)
    return “<div style=’margin: 4px;’ class=’jqx-right-align’>” + dataAdapter.formatNumber(total, “c2”) + “</div>”;

    }
    },

    % symbol to be displayed for at the end of input for Duty Percentage.
    { text: ‘Duty Perct’, datafield: ‘duty_perct’, width: 80, cellsalign: ‘right’, cellsformat: ‘c4’, columntype: ‘numberinput’,
    validation: function (cell, value) {
    if (value < 0 || value > 100) {
    return { result: false, message: “Price should be in the 0-100 interval” };
    }
    return true;
    },
    createeditor: function (row, cellvalue, editor) {
    editor.jqxNumberInput({ digits: 6 });
    }
    },

Viewing 1 post (of 1 total)