How to display values only upto 2 decimal places

后端 未结 8 2358
南旧
南旧 2020-12-17 19:04

I have a table column \"Amount\" of type money. When I am retrieving its value through a store procedure, it returns the value upto 4 decimal places(because of type money).

8条回答
  •  南方客
    南方客 (楼主)
    2020-12-17 19:48

    In Leave Event write this code

     Double x;
            Double.TryParse(txtLocl.Text, out x);
            txtLocl.Text = x.ToString("0.00");
    

    After leaving it allowed only two decimal places

提交回复
热议问题