Memento

Memento

  • NA
  • 111
  • 133.3k

How to pupulate DataGridViewColumnHeaders by dates and Names of Days

Jul 2 2012 4:14 AM
I need to populate a dgv's ColumnHeaders in this way:

Name    1         2...
        Sunday Monday ...

So first column is for Names - header is single line.
Each other column has twoLines header:
first line is date in currentMonth
second line is name of that day.
So, dgv.Columns.Count is always  = currentMonth.DaysInMonth.Count + 1
dgv is unbounded.

I allready have a long, repeating "foreach" procedure, which works, and if needed I can post it, but I need as short as possible way, probably something with arrays.

Thanks in Advance.

Answers (2)