I started using the new StrataListView which is by far super fast when loading thousands of records in comparison with the current listview and it also have many nice features showing groups, header, footers, etc.
So far, the StrataListView is still under beta and it does not have all the automation of the current listview. Since I need some of those automations, I decided to create a subclass "Progytech_StrataListView.vb" with the following automation features:
- Support for assigning a Business Object. (BusinessObject property)
- Support for auto navigating the BO for the selected record. (AutoNavigateToSeletectedRecord property)
- Support for changing the states of a checkbox when double clicking (CheckUncheckColumnIndex property). This property should be set to the column index where the checkbox will be.
Also the following events where created:
- BeforeRequery: This event is use to manually populate the Progytech_StrataListView. It is triggered by calling the Requery() method of the listview. Since I don't have the time to get into creating the ListPopulation automation, for now just use this event to code the list population. In this method you can take advantage of the listview BusinessObject property to make the code generic when using several listviews.
- AfterRequery: Enter any code you want to run after the listview has been requeried.
- UpdateObjectStates: This event is triggered in several place like when navigating the BO, when an item checked has changed, when double clicking the row, etc. This is useful to enable/disable buttons related to the listview.
I created a quick VB sample based on Trent's StrataListViewBasics C# sample to show the Progytech_StrataListView subclass in action. Since I based the code in the old listview, some of the code are not cleanup.
Hopefully the SF team will complete all these functionality and more, and there will be no need to use this class, so for me this is just a temporary solution since I needed to replace about a dozen listviews with this one.You can download the VB sample from here
. Please feel free to fix any bug and/or enhance it based on your needs.