Hi
In my listview I have a column called grantotal which is of type double.Now it is displayed as 12300 but I want to display it as 12,300.
How can I do it?
Thanx in Advance

You need to format the string before you populate the ListView. To get the thousand separator without decimals use:

private void button2_Click(object sender, EventArgs e)
    {
      int i1 = 5555;
      Console.WriteLine(i1.ToString("N0", System.Globalization.CultureInfo.InvariantCulture));
    }

Use this method

double d = 1230.00;
d.toString("#,#.00");

Use this method

double d = 1230.00;
d.toString("#,#.00");

Welcome to DaniWeb hermaljoes!

Please use code tags when posting code:

[code=csharp] ...code here...

[/code]

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.