Beta 1.6.5.1: ListView enhanced features....


Author
Message
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,

First, thanks for all the enhancements done to the ListView, very impressive Smile

I setup a form to test the ListView and found the following issues:

  • Moving the record pointer in the ToolStrip button does not update/refresh the ListView.
  • Creating a new record or modifying an existing one does not Refresh the ListView with the updated data.

I tested the functionality of the Add/Delete/Edit Objects and they all worked as expected. 

One question, when using the ListView with a child BO, I may need to have buttons for Save/Undo if not using a childform object, would you consider adding a SaveObject/UndoObject as well for this case?

Please take a loot at the video in this link:  http://www.progytech.com/videos/Beta_ListView\Beta_ListView.html

Edhy Rijo

Replies
Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Just call the CheckRules method, not the CheckRulesOnRow.  For example:

If MyBo.CheckRules(True) Then
    DialogResult = OK
End If

All of the error providers will then work, however, the InfoBox will not appear and this is by design.  That logic is placed in the Save() of the BaseForm and creates a collection list...however, you can add this yourself very easily in your BaseBO.  Just handle the BusinessRulesChecked event of the BaseBO, and you will probably want to have a property that determines if the InfoBox will be shown when there are broken rules (this too would be on your BaseBo).  The only other property that you may consider adding or testing for is the parent form (or which ever form you may want the InfoBox to show within).  But you would then call the InfoBox like this:

If e.CountOfBrokenRulesAdditionalRows > 0 Then
    InfoBox.ErrorBox(...)
Else
    InfoBox.ErrorBox(...)
End If

You can look at the BaseForm in the Business assembly of the source to see what we do in that dialog.

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

In the latest update 1.6.6 a new event BeforeChildFormExecuted was added to the ListView control.  I noticed that in the ListViewBeforeChildExecuteEventArgs there is no Cancel property to cancel any action handled by the ListView control.

Would it be necessary to add the e.Cancel property, or is there any other way to abort any of the 3 actions allow in the ListView (Add/Edit/Delete)?



Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Oh, I suppose we could add a cancel parm.  It was created so that there could be a centralized localization for pre-child form initialization code.  Technically the action is already in progress (Delete would actually never hit this event).  So either an Add or Edit will already be in progress.  Adding a cancel shouldn't be too big of a deal, so I will add this to the list.
Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Hi Trent,

Trent L. Taylor (06/24/2008)
Oh, I suppose we could add a cancel parm.  It was created so that there could be a centralized localization for pre-child form initialization code.  Technically the action is already in progress (Delete would actually never hit this event).  So either an Add or Edit will already be in progress.  Adding a cancel shouldn't be too big of a deal, so I will add this to the list.

I really have the need to be able to cancel out showing the childform dialog from the listview BeforeChildFormExecuted, I have not find a way to do this in a form without having to have all the listview code in the form to manage it. 

Have you consider adding an e.Cancel parameter?



Edhy Rijo

Trent Taylor
Trent Taylor
StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)StrataFrame Developer (14K reputation)
Group: StrataFrame Developers
Posts: 6.6K, Visits: 7K
Done, it will be in the next update.  We will post a 1.6.7 beta build in the next week or two, but this will be included.  Here is the update:

The ListView BeforeChildFormExecuted event now has a CancelAction parm on the event argument which allows several options.  None, which would continue as normal, cancel the ChildFormDialog execution only, or cancel the dialog execution and undo any data changes related to the currently executed action (i.e. if adding a new record the new record would not be added).  This gives the best of all worlds in regards to the potential needs to cancelling an automated ChildFormDialog execution.

Edhy Rijo
E
StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)StrataFrame VIP (6.4K reputation)
Group: StrataFrame Users
Posts: 2.4K, Visits: 23K
Excellent!  this much more than what I asked.

Thanks Tongue

Edhy Rijo

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Edhy Rijo - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Trent L. Taylor - 18 Years Ago
Edhy Rijo - 18 Years Ago
Edhy Rijo - 18 Years Ago
                         You probably have a filter applied or something along those lines. Or,...
Trent L. Taylor - 18 Years Ago
                             Trent, The problem was that I was not filling the Child BO and was...
Edhy Rijo - 18 Years Ago
                                 Based on my SF/.NET experience thus far...

[quote]When...
Greg McGuffey - 18 Years Ago
                                     [quote][b]Greg McGuffey (04/25/2008)[/b][hr]Hope that gets you...
Edhy Rijo - 18 Years Ago
                                         Trent, When the ListView shows the ChilForm Dim args As New...
Edhy Rijo - 18 Years Ago
                                             [quote] the form is shown as modal as it should, but it is outside the...
Trent L. Taylor - 18 Years Ago
                                                 [quote][b]Trent L. Taylor (04/27/2008)[/b][hr][quote]Initially we...
Edhy Rijo - 18 Years Ago
                                                     Hi Trent, Following my working with the ListView, I noticed that when...
Edhy Rijo - 18 Years Ago
                                                         Generally I do not allow access to the Toolstrip item if there is not...
Trent L. Taylor - 18 Years Ago
                                                             [quote][b]Trent L. Taylor (04/29/2008)[/b][hr]It is possible to add...
Edhy Rijo - 18 Years Ago
                                                                 Edhy,

You need to call the UpdateObjectStates() method...
Greg McGuffey - 18 Years Ago
                                                                     Oops, I've been sick and didn't read your post carefully enough. I...
Greg McGuffey - 18 Years Ago
                                                                         [quote][b]Greg McGuffey (04/29/2008)[/b][hr]The basic concept still...
Edhy Rijo - 18 Years Ago
                                                                         Greg is still right....there is no reason to even allow the ListView...
Trent L. Taylor - 18 Years Ago
                                                                             [quote][b]Trent L. Taylor (04/29/2008)[/b][hr]Greg is still...
Edhy Rijo - 18 Years Ago
                                                                                 Try this assembly. It also includes the changes I made to the...
Trent L. Taylor - 18 Years Ago
                                                                                     Edhy, This won't work until I make some other changes....this is why...
Trent L. Taylor - 18 Years Ago
                                                                                     [quote][b]Trent L. Taylor (04/30/2008)[/b][hr]Try this assembly. It...
Edhy Rijo - 18 Years Ago
                                                                                         Actually, I just tested it and it DOES fix the problem. Your program...
Trent L. Taylor - 18 Years Ago
                                                                                             [quote][b]Trent L. Taylor (04/30/2008)[/b][hr]Actually, I just tested...
Edhy Rijo - 18 Years Ago
                                                                                                 Sure, I just changed the UpdateObjectStates method to this:...
Trent L. Taylor - 18 Years Ago
                                                                                                     Thanks Trent.
Edhy Rijo - 18 Years Ago
                                                                                                         Trent, The DeleteChildRecord() method of the ListView is marking the...
Edhy Rijo - 18 Years Ago
                                                                                                             Your error has less to do with the delete than it does binding it...
Trent L. Taylor - 18 Years Ago
                                                                                                                 I did the test as follow and it worked just fine, of coursepassing the...
Edhy Rijo - 18 Years Ago
                                                                                                                     Edhy, Let me just point out something when we address a problem...we...
Trent L. Taylor - 18 Years Ago
                                                                                                                         Trent, [quote]Just because you get an error to go away doesn't mean...
Edhy Rijo - 18 Years Ago
                                                                                                                             Hi Trent, I have another situation with the ListView, I guess :D I...
Edhy Rijo - 18 Years Ago
                                                                                                                                 That cancel flag doesn't logically tie into the BOs BeforeAddNew...so...
Trent L. Taylor - 18 Years Ago
                                                                                                                                     [quote][b]Trent L. Taylor (05/21/2008)[/b][hr]...and FYI...saving...
Edhy Rijo - 18 Years Ago
                                                                                                                                         [quote]Point taken, then where to put the save code then? In the...
Trent L. Taylor - 18 Years Ago
                                                                                                                                             [quote][b]Trent L. Taylor (05/21/2008)[/b][hr]In one maintenance form...
Edhy Rijo - 18 Years Ago
                                                                                                                                                 [quote]So basically all child BO should be Saved when clicking the...
Trent L. Taylor - 18 Years Ago
                                                                                                                                                     Hi Trent, After your post, I when to check the SF Samples and after...
Edhy Rijo - 18 Years Ago
                                                                                                                                                         Really, we didn't even do that in VFP (bad word, I know :D). We used...
Trent L. Taylor - 18 Years Ago
                                                                                                                                                             Trent, Refactoring my child forms,i have a situation with my current...
Edhy Rijo - 18 Years Ago
                                                                                                                                                                 Just call the CheckRules method, not the CheckRulesOnRow. For example:...
Trent L. Taylor - 18 Years Ago
                                                                                                                                                                     Hi Trent, In the latest update 1.6.6 a new event...
Edhy Rijo - 18 Years Ago
                                                                                                                                                                         Oh, I suppose we could add a cancel parm. It was created so that there...
Trent L. Taylor - 18 Years Ago
                                                                                                                                                                             Hi Trent, [quote][b]Trent L. Taylor (06/24/2008)[/b][hr]Oh, I suppose...
Edhy Rijo - 18 Years Ago
                                                                                                                                                                                 Done, it will be in the next update. We will post a 1.6.7 beta build...
Trent L. Taylor - 18 Years Ago
                                                                                                                                                                                     Excellent! this much more than what I asked. Thanks :P
Edhy Rijo - 18 Years Ago
                                         [quote]Thanks Greg, much appreciated.:)[/quote]
Any time!
Greg McGuffey - 18 Years Ago
Guillermo Vilas - 18 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search