C1Label NullText bug (2025v2 Hotfix2 - .NET 10)

Posted by: abraham on 7 April 2026, 11:49 pm EST

  • Posted 7 April 2026, 11:49 pm EST - Updated 8 April 2026, 12:41 am EST

    Using the latest version of the C1Label control from C1.Win.Input (version 10.0.20252.761) the handling of DBNull/null values of is incorrect when the C1Label is bound to a data item where the field value is an empty string and the C1Label NullText property is set to some null-text warning AND EmptyAsNull = false.

    When the bound data value is an empty string; the C1Label in this case incorrectly displays the configured NullText instead of just displaying nothing (=the empty string).

    See the attached Visual Studio 2026 solution for .NET 10 and the latest release for a clear demonstration of the issue. In this bug demo the 1st and 3rd person’s country display correctly (either with a real value or DBNull/null) - the 2nd person’s country (empty string) is processed incorrectly by the C1Label.

    This behaviour would be correct if EmptyAsNull = true, but it’s set to false (default) in this demo.

    Extra comment: for the standard WinForms TextBox and Label controls this behaviour is identical, but for C1Label control with ‘EmptyAsNull = false’ different behaviour would have been expected - in line with the .NET 4.8 Framework version of C1Label.

    C1Label Null Value Bug.2026-04-08.zip

  • Posted 8 April 2026, 9:03 am EST

    Hello,

    Thank you for the details and sample.

    We could observe the behavior and thus escalated with the development team for further insights. [Internal Tracking ID: C1WIN-35223]

    We’ll get back once we have more information.

    Regards,

    Uttkarsh.

  • Posted 14 April 2026, 8:30 am EST

    Hello,

    As per the team, the issue occurs because the Value property has a TypeConverter attribute that treats an empty string as DBNull.

    The team will review this use case further. In the meantime, since the attribute cannot be removed via reflection, you can re-register it as a workaround. We have updated your sample (see Input_Label.zip) accordingly—please let us know if it helps.

    Regards,

    Uttkarsh.

Need extra support?

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

Learn More

Forum Channels