P
Peter Demeyer
I want to display data from a database as labels on a form without using a datagrid.
My problem is that I can't make the labels at design time because the amount of data is variable.
It should look a bit like this:
John 1/8/1970 Edit Remove
Peter 8/2/1972 Edit Remove
etc.
Creating a data source and dragging columns to the form doesn't seem to be the right solution for me because my data source should be something like "SELECT name, birthdate FROM people WHERE postcode=<selected value in a combobox on this form>"
The only obvious way I can see is to write code that creates labels, positions them and possibly make the form bigger if it doesn't all fit, but this seems like a lot of work and this seems such a common thing that I'd be surprised that there isn't a control (like a table) for this or something.
Easy enough on a web page I think, just add rows to a table, but this is a Windows form.
I don't like a datagrid so much because I don't think I can put buttons or labels like Edit (or a picture of a rubbish bin) in a datagrid.
Thanks for any help,
Peter
My problem is that I can't make the labels at design time because the amount of data is variable.
It should look a bit like this:
John 1/8/1970 Edit Remove
Peter 8/2/1972 Edit Remove
etc.
Creating a data source and dragging columns to the form doesn't seem to be the right solution for me because my data source should be something like "SELECT name, birthdate FROM people WHERE postcode=<selected value in a combobox on this form>"
The only obvious way I can see is to write code that creates labels, positions them and possibly make the form bigger if it doesn't all fit, but this seems like a lot of work and this seems such a common thing that I'd be surprised that there isn't a control (like a table) for this or something.
Easy enough on a web page I think, just add rows to a table, but this is a Windows form.
I don't like a datagrid so much because I don't think I can put buttons or labels like Edit (or a picture of a rubbish bin) in a datagrid.
Thanks for any help,
Peter