0

I want to change these values with DataFormatString properties in Gridview.

1.000000 --> 1 --> Deleting all digits after .

366705.000000 --> 366,705 --> Deleting all digits after . and put the comma for seperate.

12.830000 --> %12,83 --> Delete last 4 digits after . and put % (% is optinal not must)

BTW, Is there any link to suggest me otherwise DataFormatString. I analyze very well this page but sometimes still can't find what I need about data format string.

1 Answer 1

1

Here you go. I didn't test #3 - if it's not right, it's close.

1

Convert the number to an int.

2

String.Format("{0:n"}, 366705);

3

(12.83 / 100).ToString("{%#0.00}", el-GR);

A couple helpful formatting web pages:

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.