-
Jan 27th, 2013, 03:21 AM
#1
Thread Starter
Addicted Member
-
Jan 27th, 2013, 03:57 AM
#2
Re: format of cell in datagridview to 2 dp
Hi,
You have to set the ValueType of the column to use numeric formatting. From what I can see there is no way to set this property in the IDE so you need to do this in code, in let's say, the Form.Load event. i.e:-
Code:
DataGridView1.Columns("YourColumn").ValueType = GetType(System.Decimal)
Hope that helps.
Cheers,
Ian
-
Jan 27th, 2013, 04:11 AM
#3
Thread Starter
Addicted Member
Re: format of cell in datagridview to 2 dp
works like a charm.
thanks a bunch ian.
appreciate it.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|