Parent Form - Child Form - Second Child Form


Author
Message
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
On the Parent Form I am using a Listview and have successfully set it up so if I double click a record in the Parent BO it shows a Child form and list the child records of that parent in a listview.

Now when I double Click on one of the child Records I want to call a Form to Edit some of the data found in that child record. But, I get the following error when I double click the child reccod:



BusinessLayerException

There are no rows in the current data table. An edit is not allowed.



Source : MicroFour StrataFrame Business



Stack Trace:

at MicroFour.StrataFrame.Business.BusinessLayer.Edit(Boolean CheckSecurity)

at MicroFour.StrataFrame.UI.Windows.Forms.ListView.EditChildRecord()

at System.Windows.Forms.ListView.WndProc(Message& m)

at System.Windows.Forms.Control.ControlNativewindow.WndProc(Message& m)

at System.Windows.Forms.Nativewindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)



I am using a childformdialog to call the 2nd Child form. The 2nd child form never does appear. I have checked everything that I know to check but obviously I am missing some piece.

TIA.
Replies
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
Sorry I forgot to attach the screens.



Actually all I have is a Parent - Child that is one-to-many. I have the parent form with a lv on it (screencapture013) and when I double click one of the records I get the First child form with a lv on it (screencapture014) that represents the many side of the ChildBO. Now I want to double click on one of these records and I want to be able to edit it's information (screencapture015). But maybe what you recommended is what I still need to do. I will try to follow what you gave me and see if I can get it too work. Thank you for your help.

Attachments
ScreenShot013.gif (180 views, 15.00 KB)
ScreenShot014.gif (161 views, 7.00 KB)
ScreenShot015.gif (150 views, 8.00 KB)
Terry Bottorff
Terry Bottorff
StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)StrataFrame VIP (1.1K reputation)
Group: Forum Members
Posts: 448, Visits: 12K
OK I think it was putting the OnLoad Override in the middle form that made it work. Now I can see the info that I want to edit on the last form.

But, now when I click the Save Button the Changed Data does not get saved. I have the following code on the middle form and the parent form.



If e.Results = Windows.Forms.DialogResult.Cancel Then

' Cancel - Edit

'MessageBox.Show("Canceled - Edit")

BbPointsBO1.Undo(BusinessUndoType.AllRows)

ListView1.Requery()

ListView1.Focus()

Else

' OK - Save Results

BbPointsBO1.Save()

ListView1.Requery()

ListView1.Focus()

End If





Again I want to thank you for your help to get me this far.

TiA.

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