You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So it looks like the ListView ColumnHeader does not have something equivalent to the VWG ListViewColumnType property, which lets you indicate the type of data in a column.
Is this intentional? Is there something equivalent?
I need it for several things:
Sorting listviews may need to treat some columns as numeric or date - you will get a different sort order treating everything as text.
Exporting listviews to Excel lets you set the target column to the correct data type
The ListViewColumnType is a VWG addition, it's not present in WinForms. We used WinForm as the base class model while removing all items that would be obsolete on a web platform (like 3D borders) and adding a lot of additional web-css3-html5 features. While our main goal (and necessity) was to replace VWG we also didn't want to replicate features that have probably been added over the years to cover various shortcomings (at least not from the start).
The ListViewColumnType is a strange property since it doesn't specify just the data type (it has Icon and Control), it's only used to render the cells, and the only value type that can be stored in ListViewItem is a always a string anyway - unlike the DGV which supports any type. It looks like VWG tried to use the LV as a DGV with mixed results. The enumeration is a mix of data type and visual widget type (limited to Icon and Control).
You can add a Type property (or any other property) to ColumnHeader or ListViewItem in two ways:
Extend ColumnHeader -> MyColumnHeader : ColumnHeder. The editor will automatically detect any subclass and will show you the list of subclasses at design time.
Or use the UserData property (all Wisej components have it and it's a lot better that the Tag object) like this: this.columnHeader1.UserData.valueType = typeof(int), or like this this.columnHeader1.UserData["valueType"] = typeof(int). The UserData property is a dynamic object that can store anything with any key.
Activity
itg-assistant commentedon Jun 12, 2026
Luca answered 2017-01-06 18:37:11 UTC
Hi Mitch,
The ListViewColumnType is a VWG addition, it's not present in WinForms. We used WinForm as the base class model while removing all items that would be obsolete on a web platform (like 3D borders) and adding a lot of additional web-css3-html5 features. While our main goal (and necessity) was to replace VWG we also didn't want to replicate features that have probably been added over the years to cover various shortcomings (at least not from the start).
The ListViewColumnType is a strange property since it doesn't specify just the data type (it has Icon and Control), it's only used to render the cells, and the only value type that can be stored in ListViewItem is a always a string anyway - unlike the DGV which supports any type. It looks like VWG tried to use the LV as a DGV with mixed results. The enumeration is a mix of data type and visual widget type (limited to Icon and Control).
You can add a Type property (or any other property) to ColumnHeader or ListViewItem in two ways:
Extend ColumnHeader -> MyColumnHeader : ColumnHeder. The editor will automatically detect any subclass and will show you the list of subclasses at design time.
Or use the UserData property (all Wisej components have it and it's a lot better that the Tag object) like this: this.columnHeader1.UserData.valueType = typeof(int), or like this this.columnHeader1.UserData["valueType"] = typeof(int). The UserData property is a dynamic object that can store anything with any key.
Best,
Luca
itg-assistant commentedon Jun 12, 2026
mitch stephens answered 2017-01-06 18:59:39 UTC
Ok, fair enough. I don't disagree with your decision.
I had started using the Tag property to store this value.
Mitch