CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Dec 2008
    Posts
    25

    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.

  2. #2
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Good control for tabular, selectable, scrollable data?

    Quote Originally Posted by plnelson View Post
    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
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  3. #3
    Join Date
    Dec 2008
    Posts
    25

    Re: Good control for tabular, selectable, scrollable data?

    Quote Originally Posted by JonnyPoet View Post
    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?

  4. #4
    Join Date
    Jun 2008
    Posts
    2,477

    Re: Good control for tabular, selectable, scrollable data?

    You can use a DataGridView in an unbound mode.

  5. #5
    Join Date
    Dec 2008
    Posts
    25

    Re: Good control for tabular, selectable, scrollable data?

    Quote Originally Posted by BigEd781 View Post
    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.

  6. #6
    Join Date
    Mar 2005
    Location
    Vienna, Austria
    Posts
    4,538

    Re: Good control for tabular, selectable, scrollable data?

    Quote Originally Posted by plnelson View Post
    It was easy and seems to work well but it feels like a hack.
    It is a hack. 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.
    Jonny Poet

    To be Alive is depending on the willingsness to help others and also to permit others to help you. So lets be alive. !
    Using Code Tags makes the difference: Code is easier to read, so its easier to help. Do it like this: [CODE] Put Your Code here [/code]
    If anyone felt he has got help, show it in rating the post.
    Also dont forget to set a post which is fully answered to 'resolved'. For more details look to FAQ's about Forum Usage. BTW I'm using Framework 3.5 and you ?
    My latest articles :
    Creating a Dockable Panel-Controlmanager Using C#, Part 1 | Part 2 | Part 3 | Part 4 | Part 5 | Part 6 | Part 7

  7. #7
    Join Date
    Mar 2004
    Location
    Prague, Czech Republic, EU
    Posts
    1,701

    Re: Good control for tabular, selectable, scrollable data?

    I would suggest GridControl by DevExpress. Ir is powerfull , but paid
    • Make it run.
    • Make it right.
    • Make it fast.

    Don't hesitate to rate my post.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured