data binding and formatting

  • Thread starter Thread starter Saix News
  • Start date Start date
S

Saix News

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
 
Hi Michael,

You will need to set up data binding programmatically 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.
 
Back
Top