Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
//switch for first row
if (e.Row.RowIndex == 1)
{
GridViewRow Gprev = GridView1.Rows[e.Row.RowIndex - 1];
if (Gprev.Cells[0].Text.Equals(e.Row.Cells[0].Text))
{
e.Row.Cells[0].Text = "";
}
}
//now continue with the rest of the rows
if (e.Row.RowIndex > 1)
{
//set reference to the row index and the current value
int intC = e.Row.RowIndex;
string lookfor = e.Row.Cells[0].Text;
//now loop back through checking previous entries for matches
do
{
GridViewRow Gprev = GridView1.Rows[intC-1];
if (Gprev.Cells[0].Text.Equals(e.Row.Cells[0].Text))
{
e.Row.Cells[0].Text = "";
}
intC = intC - 1;
} while (intC >0);
}
}
}