Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
95
How to convert 'String' to 'Decimal' in grid
posted

Hi: all

    I have a problem,i have bound a datasource to a grid, one of the fields is decimal.

   Now, We allow user to input string like "13-5" into the cell, and we would convert that string to decimal as

   "13.5",in BeforeExitEditMode Event.But,the Text of the cell still display as "13-5",But the system will throw

   a exception "Can't convert to decimal".

   please help!

   Thanks!

  • 469350
    Suggested Answer
    Offline posted

    The best way to do something like this would be to use a DataFilter and handle the DisplayToEditor conversion, rather than using BeforeExitEditMode.