Datagrid without a Table
-
I think you can't have a Datagrid with out a table. But what I want to do is get a list of Jgp files on my computer and display them in a list, with a tick box, a preview of the JPG and a text box with the path. What would be the best way to present this as a list on screen? Sorry if this seems an easy question. Tony
-
I think you can't have a Datagrid with out a table. But what I want to do is get a list of Jgp files on my computer and display them in a list, with a tick box, a preview of the JPG and a text box with the path. What would be the best way to present this as a list on screen? Sorry if this seems an easy question. Tony
You can create a DataGridView without a datasource by manually adding columns and rows. However, using some type of datasource is going to be your best bet. Create a class to represent your image specifics and then create a typed collection for your class. Set the datasource of the data grid to your collection. I use a 3rd party grid so you may have some slightly different steps, but this is the meat of it. (For example, you may have to dump the collection into a BindingSource -- I'm not sure though.)