StrataFrame Forum
Back
Login
Login
Home
»
StrataFrame Application Framework - V1
»
WinForms (How do I?)
»
Initializing bound control after Add()
Initializing bound control after Add()
Post Reply
Like
0
Initializing bound control after Add()
View
Flat Ascending
Flat Descending
Threaded
Options
Subscribe to topic
Print This Topic
RSS Feed
Goto Topics Forum
Author
Message
Lukasz Kustusz
Lukasz Kustusz
posted 14 Years Ago
ANSWER
Topic Details
Share Topic
Group: Forum Members
Posts: 29,
Visits: 125
Hello,
I'm trying to initialize some of the properties of a new BO that's being added through a call to Add of a form.
I have a form that I I show like so:
Using frmNewEv As New frmNewEvent
frmNewEv.Add()
frmNewEv.BoEventLog1.username = "User1"
frmNewEv.ShowDialog()
End Using
In the form I have some textBoxes that are bound to the BOEventLog1 (through BusinessBindingSource), including the txtUsername bound to the BoEventLog1.username. I'd expect the above code to initialize the txtUsername to "User1" but it's not the case - the textbox is empty.
What's even stranger is that if I set txtUsername.editvalue to "User1" in Load event of frmNewEvent, I see it, but as soon I enter value in a topmost textbox and tab to the next textbox (txtUsername is the fourth field), the value of the txtUsername gets cleared. It only stays there if I put the cursor in the txtUsername first and then go back to the first field.
How should I initialize the txtUsername?
Reply
Like
0
GO
Merge Selected
Merge into selected topic...
Merge into merge target...
Merge into a specific topic ID...
Open Merge
Threaded View
Threaded View
Initializing bound control after Add()
Lukasz Kustusz
-
14 Years Ago
Hi Lukasz. Have a look at the help file under Application Framework /...
Ivan George Borges
-
14 Years Ago
Igor, Thank you for your reply. It did the trick.
Lukasz Kustusz
-
14 Years Ago
You are welcome, Lukasz. :cool:
Ivan George Borges
-
14 Years Ago
Post Reply
Like
0
Similar Topics
Post Quoted Reply
Reading This Topic
Login
Login
Remember Me
Reset Password
Resend Validation Email
Login
Explore
Messages
Mentions
Search