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.
Reply
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