jQWidgets Forums

jQuery UI Widgets Forums Grid How to replace ',' with '.' in jqxgrid

This topic contains 1 reply, has 2 voices, and was last updated by  Dimitar 10 years, 12 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author

  • anandbabu
    Participant

    Hi,
    I am using keyboard navigation grid in that i need to replace comma with dot operator(eg) in grid cell if i enter (1,23) should consider as (1.23)means in keypress i want to replace comma with dot operator.How can i achieve this.


    Dimitar
    Participant

    Hello anandbabu,

    You can achieve this by changing the entered value in the cellvaluechanging callback function, i.e.:

    { text: 'Unit Price', editable: true, datafield: 'price', width: 90, cellsalign: 'right',
        cellvaluechanging: function (row, datafield, columntype, oldvalue, newvalue) {
            var result = newvalue.replace(",", ".");
            return result;
        }
    },

    Make sure you do not have cellsformat set for the column, too.

    Best Regards,
    Dimitar

    jQWidgets team
    http://www.jqwidgets.com/

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.