I want to dynamically create a excel-like table with datagridview
, but I want to have the option to set colspan
to some columns.
The idea is just to display data, the user will not type anything, but it should be in table/spreadsheet look. If I cannot have datagridview
with colspan
is there any other type of table-like tool which has a colspan
?
I other hand the columns will be created dynamically from database query result.
I'm using windows forms.
Any ideas?
You might take a look at the TableLayoutPanel Class, which has a TableLayoutPanel.SetColumnSpan Method.
Here's a code sample, which spans the one of the text boxes on 2 columns: