DataformatString property c0 vs c2 C1GridView 2026v1 413

Posted by: enrique.pv-ext on 16 October 2026, 4:11 pm EST

  • Posted 16 October 2026, 4:11 pm EST

    Hi,

    Migrate from 2010v1 to 2026v1 413 in ASP.NET WebForms NET Framework 4.8.1.

    Using C1GridView from C1.Web.Wijmo.Controls.48.dll

    For using columns in GridView,

    We found some differences in formatting behavior after migrating from the legacy C1.Web.UI.Controls.3 controls to the new C1.Web.Wijmo controls, and we would like to understand the recommended migration approach.

    Previous version

    We used formats such as:

    {0:#,##0}

    {0:###,0}

    for integers with thousand separators,

    {0:P}

    {0:0} %

    {0:#}

    for percentages,

    {0:N0}

    for numbers,

    and:

    {0:C}

    for currency values.

    New version

    During migration, many columns were converted to formats such as:

    c0

    c2

    p0

    p1

    p2

    n2

    d

    I would like to confirm the expected behavior and the differences between these formats.

    For example:

    • What is the exact difference between c0 and c2?
    • Is c equivalent to the previous {0:C} format?

    In the legacy version, a value such as:

    $35.00

    was displayed with two decimal places using:

    {0:C}

    After migration, many columns now use:

    c0

    and the same value is displayed as:

    $35

    with no decimal places.

    Based on our review, it appears that approximately 57 columns were converted to c0, causing amounts, prices, and monetary values to lose their decimal digits. It seems we may need to review those columns and change monetary values from c0 to c2.

    Would using simply c produce the same result as the legacy {0:C} format?

    We also noticed that some percentage formats were migrated as:

    {0:0} %

    {0:#}

    and appear to remain wrapped in the old format syntax.

    Is this still supported in 2025v2 / 2026v1, or should these formats be converted to the newer Wijmo format strings (p0, p1, p2, etc.)?

    We reviewed the following forum threads:

    BadFormat DataFormatString - C1GridView 2025v2.399

    https://developer.mescius.com/forums/webforms-edition/badformad-dataformatstring-0-0-c1gridview-2025v2-399

    GroupInfo - C1GridView 2025v2.399

    https://developer.mescius.com/forums/webforms-edition/groupinfo-c1gridview-2025v2-399

    Conclusion:

    In the legacy version, the currency format was {0:C}, which displayed two decimal places. In the new version, 57 columns were migrated to c0, which appears to be the reason why amounts and prices are now displayed without decimals.

    Our current assumption is that we should review those 57 columns and change price/amount fields from c0 to c2. Alternatively, if c behaves the same way as the legacy {0:C}, that could be an easier migration path.

    Could you please confirm the recommended mapping between legacy DataFormatString values and the new Wijmo formats, especially for currency and percentage columns?

  • Posted 19 October 2026, 6:16 am EST

    Hello Enrique,

    Please note that we do not provide a migration tool between C1.Web.UI.Controls.3 and C1.Web.Wijmo.Controls, so we cannot comment on why specific columns were converted to c0.

    The main difference is that C1GridView in C1.Web.Wijmo.Controls formats values on the client side using JavaScript/jQuery (Globalize) format strings. The legacy grid used .NET format strings. This means DataFormatString in C1GridView accepts format specifiers such as “n”, “c” and “p”, and .NET composite strings such as {0:C}, {0:#,##0} or {0:0} % do not apply.

    c vs c0 vs c2: with “c”, the exact value is displayed in currency format, with no rounding or fixed decimal count. With a number after the letter, that many decimal places are shown. For example, c0 displays $35 and c2 displays $35.00. Because “c” does not force two decimals, it is not equivalent to the legacy {0:C}. To get the legacy result, use c2 for monetary columns. Since 57 columns currently use c0, you will need to review them and change the monetary ones to c2.

    Percentages: as described in our earlier thread, “p” multiplies the value by 100. If your data already stores percentages as 40 rather than 0.4, you can either divide the values by 100 before binding and use p0, p1 or p2, or use a C1TemplateField that renders the value followed by “ %”. A pattern such as {0:0} % cannot be used in DataFormatString.

    Suggested mapping:

    {0:C} → c2

    {0:N0}, {0:#,##0}, {0:###,0} → n0

    {0:P} → p (value must be a fraction)

    {0:0} % → template field, or p0 with values divided by 100

    {0:#} → n0

    Please test the mapped formats in your pages. If any format does not display as expected, share a small sample and we will look into it.

    Regards,

    Uttkarsh

Need extra support?

Upgrade your support plan and get personal unlimited phone support with our customer engagement team

Learn More

Forum Channels