Customizing the List View - SmartPlant Foundation - IM Update 44 - Customization & Programming - Hexagon

SmartPlant Foundation Customization

Language
English
Product
SmartPlant Foundation
Search by Category
Customization & Programming
SmartPlant Foundation / SDx Version
10

A number of projects have had requirements to make changes to the list view, and normally most of them are to change the behavior of drag/drop. To replace the SmartPlant Foundation list view with a custom version, you need to create a new class that inherits from SPFListview.

Namespace SPF.Client.Forms

Public Class CustomListview

Inherits SPFListview

There is an example assembly called Custom ListView sample that changes the background color of the list view to blue. There are commented out examples of how to change the behavior of drag/drop. You need to edit the DesktopClient.exe.config file to tell the client where to pick up the control as follows:

<customControls>

<listview assembly="..\..\..\Samples\Custom Listview Sample\bin\debug\Custom_Listview_Sample.dll" class="SPF.Client.Forms.CustomListview" />

</customControls>

For the 'class' key, you specify the name of the class that you defined in your code. In this case it is 'CustomListview' prefixed with the namespace.