What component can I use as a table in C #?

0

[RESOLVED] I get two information in the database, table products: ID and name. I need to show the user the ID and the name of all the products registered. The problem is that the listBox is just a list, it does not work like a table. Does anyone know if it has any component that I can put data side by side? no c #

    
asked by anonymous 16.04.2018 / 12:47

2 answers

0

Since you are fetching data from the database, you can use an element called DataGridView .

Formoreinformationonhowtouse,followsomelinks:

16.04.2018 / 13:12
0

For table is the DataGridView, and if you have a List of your object, just set the datasource of the dataGridView, example:

datagridview1.datasource = lista

Or, if you create it manually, you need to create the columns first, and then make a foreach in your list and go adding row by line;

    
17.04.2018 / 01:34