Passing BO to childform and use it with a BBS and a Datagridview


Author
Message
Thomas Holste
Thomas Holste
StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi there,

in a procedure I fill a BO with data and pass it to a form the procedure is calling. On the form is a datagridview and a BusinessBindingSource. I gave linked an "empty" BO to the BBS to design the grid. Now when the form is loaded, I want to replace this BO with the BO passed to the form in the new-Event.






Private myvormerker As MyvormerkerBO

Public Sub New(ByRef myvm As MyvormerkerBO)

MyBase.new()




InitializeComponent()

myvormerker = myvm

End Sub



In the load-event I try



Me.VMGrid.DataSource = Nothing

Me.BBS1.BusinessObject = myvormerker

Me.VMGrid.DataSource = Me.BBS1



At first I thought it to be working as the data is correctly displayed but the grid is some kinf of idabled as I cannot mark any cell or move to another row or do anything with it.

Could someone tell me what I am missing?

Thanks in advance

Thomas



Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Thomas,

You have to use a Child Form Dialog control to call your other form.  The ChildformDialog have a business object translator which allows you to pass the BO from the calling form to the child form dialog.

Take a look at the SF help under the Application Framework->UI Layer->Child Form Dialog

Edhy Rijo

Thomas Holste
Thomas Holste
StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)StrataFrame User (294 reputation)
Group: StrataFrame Users
Posts: 144, Visits: 618
Hi Edhy,

thanks for your help but after using it, I avoid using the childform-control because it is only suitable for easy tasks, as someone told me in another thread. I have replaced it almost everywhere in my app as I had only problems with it ( a lot of threads in this forum tell about it)

But I have solved the problem. After looking and looking at it, I deleted it all and rebuild it exactly the same way and now it works as expected.

Strange world of Visual Studio.

Best regards

Thomas
Edhy Rijo
E
StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)StrataFrame VIP (3.7K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Thomas,

I am glad you fix the issue, even when you had to re-create your form.

Edhy Rijo

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