Populating a listview

Posted by jmls on 23-Jun-2009 02:06

The time has come for me to learn to use listviews

However, unlike most other controls, this seems a little tricky when it comes to binding data. Is there not a simple way to attach a datasource and just read the items from the query ? The sample code implies that you have to loop through each record and manually add each item. I thought that we had passed this ActiveX style coding a while back !

All Replies

Posted by Håvard Danielsen on 23-Jun-2009 10:04

Neither the WinListView nor its replacement, the WinExplorerBar, have functionality to accept a DataSource in the way the WinGrid has.

The question has been asked in the Infragistics forum and Infragistics representatives suggest entering a feature request.

Message was edited by: Havard Danielsen

The ExplorerBar replaces the ListBar not the ListView

Posted by jmls on 23-Jun-2009 12:33

hdaniels wrote:

Neither the WinListView nor its replacement, the WinExplorerBar, have functionality to accept a DataSource in the way the WinGrid has.

The question has been asked in the Infragistics forum and Infragistics representatives suggest entering a feature request.

Thanks.

um, ok, where do I find this mysterious WinExplorerBar ? Is it part of the 2009 release ?

Posted by Håvard Danielsen on 23-Jun-2009 12:42


um, ok, where do I find this mysterious WinExplorerBar ? Is it part of the 2009 release ?

From the documentation:

WinExplorerBar

WinExplorerBar is a next-generation version of the WinListBar control. It includes all the functionality of the WinListbar element (with the exception of the option to display the element in a horizontal orientation) plus much more.

Toolbox Item: UltraExplorerBar

Namespace: Infragistics.Win.UltraWinExplorerBar

Posted by jmls on 23-Jun-2009 13:10

hdaniels wrote:

From the documentation:

WinExplorerBar

WinExplorerBar is a next-generation version of the WinListBar control. It includes all the functionality of the WinListbar element (with the exception of the option to display the element in a horizontal orientation) plus much more.

Toolbox Item: UltraExplorerBar

Namespace: Infragistics.Win.UltraWinExplorerBar

I was looking at the ListView, not the ListBar. Is this UltraWinExplorerBar a replacement for the UltraListView as well ? If so, how can I show the items of a group in Icon or detail view ? I can only seem to get one view style - a single column of icons / with or without text

Posted by Håvard Danielsen on 23-Jun-2009 13:33

jmls wrote:

I was looking at the ListView, not the ListBar. Is this UltraWinExplorerBar a replacement for the UltraListView as well ? If so, how can I show the items of a group in Icon or detail view ? I can only seem to get one view style - a single column of icons / with or without text

Sorry. I think it only replaces the ListBar.

Posted by jmls on 23-Jun-2009 13:57

Awwww, crap.

Posted by Håvard Danielsen on 23-Jun-2009 14:07

Note that the point I tried to make was that none of these components (Listview or ExplorerBar) support the DataSource functionality. So you would not have been better off in regards to databinding with the ExplorerBar.

Posted by jmls on 24-Jun-2009 08:16

hdaniels wrote:

Note that the point I tried to make was that none of these components (Listview or ExplorerBar) support the DataSource functionality. So you would not have been better off in regards to databinding with the ExplorerBar.

Yeah, I did get your point. Honest I did !

I still find it strange that they don't support a datasource though.

Posted by Peter Judge on 24-Jun-2009 08:31

jmls wrote:


Yeah, I did get your point. Honest I did !

I still find it strange that they don't support a datasource though.

This is somewhat of an unexplored tangent, but most of the Infragistics collections inherit from KeyedSubObjectsCollectionBase. So I'm wondering whether it might be worthwhile to create a generic PDS/TT-to-Object[] utility, which would then work everywhere (? most places?). I've not explored this in code at all, so YMMV.

An alternative might be to - you know 'em! you love 'em! - create a ListView user control

A datasource would be nice, make no mistake.

-- peter

Posted by jmls on 24-Jun-2009 08:35

pjudge wrote:

This is somewhat of an unexplored tangent, but most of the Infragistics collections inherit from KeyedSubObjectsCollectionBase. So I'm wondering whether it might be worthwhile to create a generic PDS/TT-to-Object[] utility, which would then work everywhere (? most places?). I've not explored this in code at all, so YMMV.

An alternative might be to - you know 'em! you love 'em! - create a ListView user control

A datasource would be nice, make no mistake.

-- peter

Are you spying on me ? Where's that webcam ?

 * jmls covers the screen and keyboard from prying eyes

Posted by Peter Judge on 24-Jun-2009 08:39

jmls wrote:


Are you spying on me ? Where's that webcam ?

 * pjudge covers the screen and keyboard from prying eyes

Webcams are for sissies. Real men use  http://en.wikipedia.org/wiki/Van_Eck_phreaking

-- peter

This thread is closed