Databinding Textbox on TabPage

G

Guest

Hello!

i have a textbox on a tabpag. the text-property is bound to a field in a
datarow.
now we implemented validation. the problem is: the text property is not set
if the tabpage with the textbox was not visible.

you can check this: the format event for the binding is not fired unless you
make the textbox visible.

i think there must be a way do start this "formatting" by code. but i can't
find the way.

Thanks!
Martin
 
D

Dmytro Lapshyn [MVP]

Hello Martin,

A workaround I know of is to set the focus programmatically to the invisible
textbox and then set the focus programmatically to where it was before. This
will force the textbox to validate its data and push them to the data
source.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top