Reputation: 1376
I want to append the dataSource to dataGridvIew from database which is having money fields as
Here nrdc_ItemPrice
and nrdc_Lntotl
fields are appending to datagridview as shown in 1st image
How can I control them to .00 values. Here is my code
dsEstmDtls = salesDCCls.ordrAckDataSet(estmID);
dtDCDtls = dsEstmDtls.Tables[1];
dgvDcNon.DataSource = dtDCDtls;
Upvotes: 1
Views: 812
Reputation: 5423
Change the DataGridView
column format :
dgvDcNon.Columns["ColumnName"].DefaultCellStyle.Format = "N2";
You can do that from the designer as well. Example from the web :
Upvotes: 2