event on sql table bound control

G

GS

which event should I use to process and format the display of a column after
navigating into the row?

I looked at the event for the data bound text control, I did not see
anything obvious.

I am trying to use the string form of a numeric value to set some checkboxes
so user can see and change the value easily.

thank you for your time and advice.
 
C

Cor Ligthert[MVP]

GS,

Web or window forms, your text looks a little bit like webdevelopment.

Otherwise, what is a databound text control?

If it is by instance about a textbox in windows form, then it is just
databinding it, the binding manager is than handling the rest.

Cor
 
G

GS

Thank you.

sorry, I should clarify that I am talking about window form, could be part
of datagridview or just some textbox control bound to sql table column via
binding source.

I did a quick find for bindingmanager on the entire solution and found
nothing like that.


from built-in help, I found BindingManagerBase and example. Seems to me I
have to get that form my bound control, say regexOptionsTextBox:
Dim mydbm as BindingManagerBase
= regexOptionsTextBox:.DataBindings.BindingManagerBase.
Dim myPosnChgd as EventHandler
and somehow create the event handler for mydbm.PositionChanged like
AddHandler mydbm.PositionChanged, myPosnChgd
I can then use myPosnChgd to set a bunch of regex Options check boxes like
IgnoreCase, Multiline, SIngle Line, ECMAScript, ExplicitCapture....


Am I on the right track?
 
C

Cor Ligthert[MVP]

GS,

This is very easy stuff, to show you a sample from our webpage.

http://www.vb-tips.com/DataBindingEvents.aspx

This parts from the code is in my idea actually about your problem although
the rest of the code extensions that.
\\\
Dim Mybinding As New Binding("Text", ds.Tables(0), "DateField")
TextBox1.DataBindings.Add(Mybinding)
///

In words, you bind the property Text from the Textbox to the property
"DateField" from the DataTable.

Cor
 
G

GS

...aha... I think I got the drift from your complete example to connect
format and parse events to textboxes.


I will get give it whirl .


Thank you very much. much appreciated
 

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