I want to display same data in between for a range of 2 dates for C# asp.net using DataBound gridview in asp.net c#
example in the image, i want to display the data in between 21-Nov-2013 until 29-Nov-2013 that all the dates in between have the country name Indonesia.
I used int i = e.Row.RowIndex; to capture the current index whr it is match with the date for 21-Nov-2013, int j = e.Row.RowIndex; for 29-Nov-2013.
if (e.Row.Cells[0].Text == "21-Nov-2013")
{
int i = e.Row.RowIndex;
e.Row.Cells[2].Text = "Indonesia";
}
else if (e.Row.Cells[0].Text == "29-Nov-2013")
{
int j = e.Row.RowIndex;
e.Row.Cells[2].Text = "Indonesia";
}
else {}
for(i;i<j;i++)
gridview1.Rows[i].Cells[2].Text = "Indonesia";