Search code examples
c#databasevisual-studiodatagridviewdesigner

C# DataGridView use Rows and Columns as Headers


I am connected to a Database. I created an DataViewGrid which uses Databinding from that Database. I want to use Rows and Columns as Headers, right now somehow there are just Columns as Headers. I am using Visual Studio 15 and want to use the Designer. Does anyone ever did that? Or know an better Windows.Form for creating Table, which are connected to the Database and have Headers at the Row and Column side?

Thx in advance


Solution

  • Thirdparty Grids like DevExpress PivotGrid allow you do to sth. like this. The basic dataGridView is not able to present RowHeader as far as i know. You could create a custom column to your DataSource, which holds RowHeader information and show this as first column. If you modify the first columns layout a bit it looks like RowHeader maybe. Would be the only trick i know with basic dataGridView.