StrataFrame Forum

Enhanced Listview

http://forum.strataframe.net/Topic16467.aspx

By Michael Reese - 5/20/2008

I am now using the enhanced listview and have a question. I have the listview configured to the local Add,Edit and Delete Control. I also have it set to Childform and BO. Everything is fine except that the listview does not reflect the changes upon update from the childform.

Are we still required to perform a requery? And where?

By Edhy Rijo - 5/20/2008

Hi Michael,

Yes you need to put code in the ListView's ChildFormResults event to requery the list.  Here is sample of the code I use in one of them:

Private Sub lvPolicy_ChildFormResults(ByVal sender As System.Object, ByVal e As MicroFour.StrataFrame.UI.Windows.Forms.ListViewChildFormResultsEventArgs) Handles lvPolicy.ChildFormResults

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

          '-- Save the Policy BO

          Me.Child_PolicyBO1.Save()

     Else

          Me.Child_PolicyBO1.Undo(MicroFour.StrataFrame.Business.BusinessUndoType.AllRows)

     End If

     '-- Force the listview to requery

     e.Requery = True

End Sub

By Michael Reese - 5/20/2008

Thanks Much!
By Trent L. Taylor - 5/21/2008

It looks like Edhy got you going.  Smile