data binding and formatting

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Saix News

    #1

    data binding and formatting

    hi,

    i have a dataset and a number of controls that are bound to it.

    some of the records being displayed are numerical and are bound to text
    boxes. they display without a problem but i would like to be able to format
    the numbers being displayed using thousand separators, etc. could someone
    please point me in the right direction as to how to do this - i have not
    been able to find a way of doing this.

    many thanks.
    michael


  • Dmitriy Lapshin [C# / .NET MVP]

    #2
    Re: data binding and formatting

    Hi Michael,

    You will need to set up data binding programmaticall y for these controls.
    Please refer to the Binding class documentation in the MSDN Library for an
    example. To implement custom formatting and parsing, you should subscribe to
    the Format and the Parse events of the corresponding Binding class instance
    and write custom formatting/parsing code in the event handlers.

    --
    Dmitriy Lapshin [C# / .NET MVP]
    X-Unity Test Studio

    Bring the power of unit testing to VS .NET IDE

    "Saix News" <michael@2ocean s.com> wrote in message
    news:bj4ct4$598 $1@ctb-nnrp2.saix.net. ..[color=blue]
    > hi,
    >
    > i have a dataset and a number of controls that are bound to it.
    >
    > some of the records being displayed are numerical and are bound to text
    > boxes. they display without a problem but i would like to be able to[/color]
    format[color=blue]
    > the numbers being displayed using thousand separators, etc. could someone
    > please point me in the right direction as to how to do this - i have not
    > been able to find a way of doing this.
    >
    > many thanks.
    > michael
    >
    >[/color]

    Comment

    Working...