473,406 Members | 2,698 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

Problems with databinding in winforms

Hello,

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 :

[Bindable(true)]

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
value.

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
dataset.

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 2406

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: BBFrost | last post by:
We just recently moved one of our major c# apps from VS Net 2002 to VS Net 2003. At first things were looking ok, now problems are starting to appear. So far ... (1) ...
0
by: r_elbers | last post by:
Hello, Does anybody know about some docs about real internals off databinding ? Old DDX was clear enough about when to expect what event, but it isnt very clear when the first update of a...
4
by: pmcguire | last post by:
Can someone explain to me the difference between these two bindings? dim b as Binding b=New Binding(dsMyDataset.tblMyTable, "colMyColumn") b=New Binding(dsMyDataset,...
9
by: Dennis | last post by:
I have tried using Databinding for my application but always seem to find it very restrictive (maybe I don't completely understand it enough). I always seem to find it much easier to display a...
0
by: Andrew Ducker | last post by:
Am I right in thinking that databinding only really takes effect when a control is made visible? The reason I ask is that the application I'm working on consists of a collection of Panels, each of...
0
by: Wayne Sepega | last post by:
I have the following Object DataSource <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" SelectMethod="GetCustomer" TypeName="Customers" DataObjectTypeName="Customer"...
1
by: Dave A | last post by:
Hi, I am struggling with two way databinding in WinForms and the DataGridView. I am binding to business object classes (rather than datatables). If I have a collection of these business...
1
by: Hoffmania | last post by:
Is there a good tutorial of getting databinding working with NHibernate collections such as bags with lazy loading. I can access the collection programaticly, but not directly with databinding.
0
by: chea kimcheng | last post by:
I have seen the solution about the reportviewer VB.Net 2005 but I have some question to ask you. Private Sub btnClientTest_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.