470,647 Members | 1,229 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,647 developers. It's quick & easy.

Problems with databinding in winforms


I have a very strange problem which involve databinding in winform
c#.net 2 .

I have a user control which holds textbox inside.

the user control has property which reflect the inner textbox text
property :


public string Content


get { return textBox1.Text; }

set { textBox1.Text = value; }


when the user click on a specific key (in the example attached the key
'enter'), the active control is changed using the method '.select()'.

In the example attached you can see the flow of my application. when
the user click on enter, i perform 'writevalue' of the relevent binding
to the dataset. then i change the active key using 'select()' method.

in my real application, after i leave the control using the 'select()'
the dataset value is cleared for unknown reason.

meaning, when i do the 'writevalue' i can see in debug that the value
is inserted to the dataset. but after the new control get the focus,
the dataset value returns to it's old value and doesn't contain new

THIS PROBLEM OCCURS only when i use the custom key to move from my
active control. when i use the TAB key then the data remains in the

I added the solution example even when in this solution the flow works
ok (you can see the when pressing 'enter' in my example, the data is
shown in the second control.

Please help.

Oct 13 '06 #1
1 2297

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by r_elbers | last post: by
4 posts views Thread by pmcguire | last post: by
9 posts views Thread by Dennis | last post: by
reply views Thread by Andrew Ducker | last post: by
reply views Thread by Wayne Sepega | last post: by
1 post views Thread by Hoffmania | last post: by
1 post views Thread by Korara | last post: by
reply views Thread by warner | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.