0

I would like to create a table with multiple headers using DataGridView in C#. I can create a table. However, I need multiple headers in the table. Attached is the screenshot of the table I would like to create.

Any idea how to do it.

enter image description here

4
  • If you can post some code what you have tried, it will be easier to proceed because its not something you get out-of-the-box. Needs overriding of Paint and Invalidated handlers (of DataGridView) I guess. Commented Nov 5, 2012 at 10:54
  • As I mentioned, I am not sure yet how to achieve it. I currently have a simple table with columns " Date, ClientName etc". I populate each row from the databse. I would like to have additional header to classify rows( and data) based on date Commented Nov 5, 2012 at 10:59
  • I am not sure you can do this in a formal way (type of pivot table). The only way I can suggest is to add the row Yesterday for instance with the other columns blank - although this does not seem satisfactory it may be the only way to go... Commented Nov 5, 2012 at 11:07
  • Have a look at this - pcreview.co.uk/forums/… Commented Nov 5, 2012 at 11:08

1 Answer 1

1

This is the concept regarding DataGrid with in DataGrid.You first have to Bind MasterGrid and then bind Child grids with in Master grid.This link will surely help you : http://www.codeproject.com/Articles/22928/GridView-within-GridView`

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.