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
455
WinGrid: Cell Update for decimal value with fix precision
posted

Hi,

I have wingrid with one updatable column which accepts the decimal value. When user edit the value, in the BeforeCellUpdate event I can check whether value is correct (like within a acceptable range etc.) or cancel the change if not. But if the value is correct I need to the round the value to max of 4 decimal points (as use can enter any number of decimal in the field, I am not using any mask control for the field and don't want to use any)  I cannot change the NewValue field in the BeforeCellUpdate event as it is readonly, what is the best way to update the value once user has updated the cell and exited the edit mode before the underlying datasouce is updated.

 Also the grid update mode is set to UpdateMode.OnCellChange

Thx

Parents Reply Children
No Data