WinForms UserControl not refreshing bound control.


Author
Message
Alan P Bourke
Alan P Bourke
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 12

I have a UserControl that implements MicroFour.StrataFrame.UI.Windows.Forms.UserControl.

On that UserControl I have a BO, and a textbox bound to that BO in the normal way. In the UserControl Load event I have a call to FillDataTable() .

I also have a testbed project with a form that uses the control.

The problem is when I run the testbed project the form comes up and displays the first record in the textbox, however the textbox is disabled. If I place a MaintenanceFormToolStrip either on the UserControl itself, or the test form that hosts the UserControl, it does not seem to connect to the BO as the buttons on the strip don't change the textbox.

Also, if I place my own button on the UserControl and use that to call MoveNext() on the BO, I can see the CurrentRowIndex changing, but the textbox just stays as is.

I suspect I'm interpreting what I should be doing here incorrectly - any pointers?

TIA ...


Alan P Bourke
Alan P Bourke
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 12
I should add that the call to FillDataTable() is "select * from mytable" i.e. it will be returning more that one record.
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Alan,

Take a look at the StrataFlix sample application specifically at these items:

  • StrataFlix.UI PeopleLookupControl.vb user control
  • StataFlix CastMemberSelection.vb form

There you have a live sample of a user control and how to manage it in a regular form.  I personally have not used that feature so I may not be able to get deeper in this topic.

Edhy Rijo

Alan P Bourke
Alan P Bourke
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 12
Thanks. That looks fairly complicated Sad
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Forgot to mention, do a search in the forum for "UserControl" that will give you several hits, and your answer should be there. 

I have found with SF that once you understand the "How to", things that looks complicated, are in fact very easy to accomplish.

Edhy Rijo

Alan P Bourke
Alan P Bourke
StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)StrataFrame Beginner (7 reputation)
Group: Forum Members
Posts: 7, Visits: 12
Aha! As simple as setting up the Business Object Translation!



Don't see it in the help file though ...



Thanks.
Edhy Rijo
E
StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)StrataFrame VIP (4.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Great!, glad you found it.

Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)StrataFrame Developer (10K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 6.9K
Yeah, that is exactly what that is for.  I will make a note of the help and make sure it gets in there.
GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search