By Thomas Holste - 4/1/2015
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
|
By Edhy Rijo - 4/2/2015
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
|
By Thomas Holste - 4/6/2015
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
|
By Edhy Rijo - 4/6/2015
Hi Thomas,
I am glad you fix the issue, even when you had to re-create your form.
|
|