TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Amit Gupta
NA
22.9k
241k
Round off in string datatype
Mar 6 2016 2:27 PM
Hi everyone
I am using datatable of string datatype as one of the column... it contains value of string and decimal values both. When it contains decimal value,it shows upto 10 digit decimal point... i want to show upto 2 decimal point.
For eg.
%less - is a column name which contains string datatype
Mrp - is of decimal datatype
Sales price - decimal datatype
I had implemented an expression in datatable that
If ( mrp =0)
%less =N/A
Else
(((Mrp - salesprice)*100)/mrp)
It is calculating perfectly but not upto 2 decimal point.
When I use round or cast function to get it roundoff, datatable shows blank value
I also used grid autogeneratingcolumn event
And set the column binding format to 0.00
This also doesnt work.
Kind provide me a decent solution for this...
It would really be appreciateable
Regards
Amit
Reply
Answers (
2
)
Need to send signature with my email.
report in asp.net