DataGridView Int Column Displays Comma's?

Posted on 2007-07-24
Last Modified: 2012-06-27
Moving question from SQL to here:

Q. Why do I have comma's in my DataGrid but not in SQL Querry Analyzer.

I would like to eliminate them if possible.
Question by:kvnsdr
    LVL 96

    Accepted Solution

    Did you set the display format for the column?  You can specify {0:N0} for numbers to display with commas.  You can also specify the fixed format {0:F0}.

    LVL 1

    Author Comment

    Here's what I came up with, thanks for the advice.

    dataGridView1.Columns["Number"].DefaultCellStyle.Format = "0";

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
    Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now