I use the following code to change the Column Name but unfortunately it won't let me do that. Please help me to solve this problem:
DateTime dt = DateTime.Now;
string s = dt.DayOfWeek.ToString();
for (int i = 0; i < 10; i++)
{
dataGridView1.Columns.Add(string.Format("col{0}", i), s);
}
for (int i = 0; i < dataGridView1.Columns.Count; i++)
{
int c = dataGridView1.CurrentCell.ColumnIndex;
string str = dataGridView1.Columns[c].HeaderText;
if (str == "Wednesday")
{
str = "fifth day of week";
}
}
Also is there any way so that I can get all day of week after each other between specific datetimes.
Any help will be appreciated