Currency format in DataGridView in windows application

后端 未结 6 2024
一个人的身影
一个人的身影 2021-01-13 06:55

i am unable to show currency format on DataGridView. Can you people look this code.

private void dataGridView1_DataBindingComplete(object sender,
                    


        
6条回答
  •  再見小時候
    2021-01-13 07:22

    Also you can use this for Windows Forms: (or its equivalent for WPF or ASP ,...)

    yourColumn.DefaultCellStyle.Format = "#,#";
    
    // And add below if you want
    yourColumn.DefaultCellStyle.NullValue= "0";
    

提交回复
热议问题