1,105,169 Community Members

DataGridView currency formatting

Member Avatar
vinayphadke
Newbie Poster
11 posts since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi,

I'm formatting a column in datagridview to "C" i.e. currency.

dgcColumn1.DefaultCellStyle.Format= "C";

I want to format the values for this column to nearest round no.
For example,
If user enters within $30.00 to $30.50 it will get formatted to $30
If user enters within $30.51 to $30.99 it will get formatted to $31.

Can anyone suggest me solution for this?

Member Avatar
vinayphadke
Newbie Poster
11 posts since Feb 2012
Reputation Points: 0 [?]
Q&As Helped to Solve: 0 [?]
Skill Endorsements: 0 [?]
 
0
 

Hi..
Any solutions on this?

Hi,

I'm formatting a column in datagridview to "C" i.e. currency.

dgcColumn1.DefaultCellStyle.Format= "C";

I want to format the values for this column to nearest round no.
For example,
If user enters within $30.00 to $30.50 it will get formatted to $30
If user enters within $30.51 to $30.99 it will get formatted to $31.

Can anyone suggest me solution for this?

You
This article has been dead for over three months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article