Round off in string datatype
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