Good control for tabular, selectable, scrollable data?
I have a desktop C# app used in scheduling musicians at a music camp. It presents ensembles in a ListView - 1 row per ensemble, each player is a subitem.
I've been asked to make the players individually selectable, but I can't see any way to make Listview subitems selectable.
Is there a way, and if not is there a better control to do this?
Note that the data is NOT coming from a database, just a data file.
Thanks in advance.
Re: Good control for tabular, selectable, scrollable data?
Quote:
Originally Posted by
plnelson
I have a desktop C# app used in scheduling musicians at a music camp. It presents ensembles in a ListView - 1 row per ensemble, each player is a subitem.
I've been asked to make the players individually selectable, but I can't see any way to make Listview subitems selectable.
Is there a way, and if not is there a better control to do this?
Note that the data is NOT coming from a database, just a data file.
Thanks in advance.
Maybe use a Datagridview
Re: Good control for tabular, selectable, scrollable data?
Quote:
Originally Posted by
JonnyPoet
Maybe use a Datagridview
I thought DataGridViews were designed for relational database binding. How adaptable are they to having data just poked in and removed programmatically?
Today I was experimenting using a TableLayoutPanel filled with hundreds of Label controls. It seems to work pretty well (although I haven't yet worked out a way to assign a single context menu handler to all the Labels and figure out which one triggered the popup menu, but otherwise it works pretty well - it just seems like a hack.
Any other comments/suggestions?
Re: Good control for tabular, selectable, scrollable data?
You can use a DataGridView in an unbound mode.
Re: Good control for tabular, selectable, scrollable data?
Quote:
Originally Posted by
BigEd781
You can use a DataGridView in an unbound mode.
I didn't know you could - I'll look into that.
Today I wrote a alternative based on TableLayoutPanel and lots and lots of embedded label controls. It was easy and seems to work well but it feels like a hack.
Re: Good control for tabular, selectable, scrollable data?
Quote:
Originally Posted by
plnelson
It was easy and seems to work well but it feels like a hack.
:D It is a hack. :lol: You can eaily use Datagridview and doing al what you want. Databinding can be done but is no need to do it. You can add and remove data by your own code with no problems. In all cases where my grids have to do more specific issues I'm not using binding and it all works great. You can have read only cells there as well as you may have cells which are read- write in usage. Try it, its speedy and will satisfy your needs.
Re: Good control for tabular, selectable, scrollable data?
I would suggest GridControl by DevExpress. Ir is powerfull :) , but paid :(