piyusha patravali
if (e.Row.RowType == DataControlRowType.DataRow) {
for (int i = 0; i < 6; i++) { TextBox txt = new TextBox(); txt.CssClass = "SmallTextBoxDate"; txt.ID = "TextBox" + (i).ToString(); if (dt != null && dt.Rows.Count > 0) { { txt.Text = dt.Rows[e.Row.RowIndex][i - 1].ToString(); } } e.Row.Cells[i].Text = ""; e.Row.Cells[i].Controls.Add(txt); }
for (int i = 0; i < 6; i++)
{
TextBox txt = new TextBox();
txt.CssClass = "SmallTextBoxDate";
txt.ID = "TextBox" + (i).ToString();
if (dt != null && dt.Rows.Count > 0)
txt.Text = dt.Rows[e.Row.RowIndex][i - 1].ToString();
}
e.Row.Cells[i].Text = "";
e.Row.Cells[i].Controls.Add(txt);
} } } protected void btnAdd_Click(object sender, EventArgs e){ string A=(((TextBox)gvrItem.FindControl("txtE")).Text).tostring();//Here I m getting null value} please help