2
Answers

c# winforms - how to populate DataGridViewRowHeaders and FirstRow - like a Calendar

Memento

Memento

12y
1.4k
1

On a form I have a DataGridView and three buttons.

Buttons are: lastMonth, currentMonth and nextMonth.

dgv has 30 or 31 columns (each column is a day of the month).

ColumnHeaders are: 1 2 3 ... (date).

I should populate firstRow of dgv with the dayNames (first letter) - M T V ...

something like:

1  2  3  4  5... till 30 or 31   // these are column headers

M  T W  T  F... till end        // these are firstRowCells       

Click on Buttons should change the first row according to first letter of the day in corresponding month.

Anu idea about coding ? Thanks.

Answers (2)