I have a bound field in my Gridview which is getting its value from a database table.
I have got the data but don\'t know how to format it inside the gridview.
A couple of ways in how you can do that
Option 1
Option 2
Option 3
Create a method in the code behind page that returns the formatted number.
protected string GetFormatedNumber(object number)
{
if ( number != null )
{
return number.ToString("N");
}
return "0";
}
And call the method in your aspx page as below: