I have a members name coming from a database. Now I need to display these items in a list box. I have another table products coming from database.
As per client requirement, I need to display these items in the same list box.
Is it possible to place two lists of items in the same list box separated by empty space? And is it possible to trigger some action when clicking on an item?
Could anyone please help on this?
If it’s not possible with list box, is it possible in a list view to add two groups in a single column separated with white space as shown in the figure above?
Here is a very basic example of a ListView with groups:
This MSDN article has a more advanced example: ListViewGroup Class
Be aware that groups are only supported on certain operating systems (XP and above I think), so you will need to factor this in to your code.
And here is an example using a TreeView:
Hope these help.