I write the code for dynamically create link button
LinkButton lnk = new LinkButton();
lnk.ID = "lnk";
lnk.Text = "LinkButton";
this.form1.Controls.Add(lnk);
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (string.IsNullOrEmpty(e.Row.Cells[2].Text))
{
if (e.Row.Cells[1].Text =="select")
{
lnk.Visible = true;
}
}
}
Gridview as follows
Available Dates
27 May 2015
30 May 2015
1 Jun 2015
Emptyrow
29 May 2015
31 May 2015
2 Jun 2015
i want to link button when gridveiw row is empty.
I tried but it is not working
I want excepted output as follows
Available Dates
27 May 2015
30 May 2015
1 Jun 2015
Link button
29 May 2015
31 May 2015
2 Jun 2015
In the empty row in gridview i want to display the link button in gridview.