Specifying the format for a column in Progress.Data.BindingS

Posted by Kai Siegele on 16-Apr-2018 04:47

Hallo,

I have created a new ABL form-class with some textboxes on it.

Then I have added a Progress.Data.BindingSource-object to the form. This binding source is attached via query to a record of a table of a dataset.

I have added this binding source to the databindings of the textboxes to specify which field to show in the textbox f.e..

tbKontrahentenLimit:DataBindings:Add("Text",  bsKontrahent, "KontrahentenLimit").

Than I have filled the query and refreshed the binding.

Everything works without problems.

And now my question:  Since KontrahentLimit is a currency I want to use a numeric format for display. Has anyone an idea how to do? I have not found a way in Progress.Data.BindingSource how to specify the format for a column.

Kind regards

Kai Siegele

All Replies

Posted by Laura Stern on 16-Apr-2018 06:40

You cannot do this through the BindingSource.  The BindingSource is not responsible for anything visual.  It is only about connecting controls to your data.  You need to do this through the text box functionality.  And sorry, I can’t help you there.  But that’s where you need to be looking.  You may need to use a RIchTextBox if what you’re using doesn’t have what you want.

Posted by jquerijero on 17-Apr-2018 17:40

Bind your data to a control like UltraMaskedTextBox. It has a property for input/display mask, which you can use to format your data. 

[quote user="Kai Siegele"]

Hallo,

I have created a new ABL form-class with some textboxes on it.

Then I have added a Progress.Data.BindingSource-object to the form. This binding source is attached via query to a record of a table of a dataset.

I have added this binding source to the databindings of the textboxes to specify which field to show in the textbox f.e..

tbKontrahentenLimit:DataBindings:Add("Text",  bsKontrahent, "KontrahentenLimit").

Than I have filled the query and refreshed the binding.

Everything works without problems.

And now my question:  Since KontrahentLimit is a currency I want to use a numeric format for display. Has anyone an idea how to do? I have not found a way in Progress.Data.BindingSource how to specify the format for a column.

Kind regards

Kai Siegele

[/quote]

This thread is closed