Imran Akram's blog

Let's talk about life, technicalities, career opportunities, current affairs and a lot more!

how to show numbers in 0, 1, 2, 3, 4 decimal places in a GridView?

When you have a GridView control and you bind it to a decimal field (for example), you can manipulate the format of the string shown by using the format specifier in the BoundField or in the Eval function in the TemplateField. Here’s how you do it. Use the f with a number such as f0 [...]

  • Share/Bookmark