开发者

ListView + POCO

Can I somehow use POCOs in a ListView? Or are ListViewItem's my only option?

I开发者_JS百科f I can only use ListViewItems is it possible to assign a value object (my POCO) or is it possible to use subitems with value objects?

Thanks in advance!


You can use ObjectListView which plays very nicely with POCOs.

ListView + POCO

Update

ObjectListView is based on the regular ListView, but it uses some magic and the win32 api to make everything possible. It's not very hard to get started with it and I don't really see why you can't use it?

Standard listview: All options (except owner drawing) include using a ListViewItem. If you got a large collection I recommend that you use Virtual Mode which means that the list view will request each item that is visible.


I just found out the ListViewItem.ListViewSubItem class Tag and Text work fine for me. No Pocos though, but I can keep the original values in their original data types.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜