P
Paul
In the code below the first line works to read data from the gridview control
but the second line the ltest label is null. The very first column of the
grid is a bound data item that I converted to a template column. This column
has a label called lblDiscID which gets populated on the gridview control
correctly. Thanks.
protected void gridview_RowUpdating(object sender, GridViewUpdateEventArgs
e)
{
string DiscDescrip =
Convert.ToString((gridview.Rows[e.RowIndex].Cells[5].FindControl("txbxDiscgv") as TextBox).Text);
Label ltest = (gridview.Rows[e.RowIndex].Cells[0].FindControl("lblDiscID")
as Label);
ltest is always null!
but the second line the ltest label is null. The very first column of the
grid is a bound data item that I converted to a template column. This column
has a label called lblDiscID which gets populated on the gridview control
correctly. Thanks.
protected void gridview_RowUpdating(object sender, GridViewUpdateEventArgs
e)
{
string DiscDescrip =
Convert.ToString((gridview.Rows[e.RowIndex].Cells[5].FindControl("txbxDiscgv") as TextBox).Text);
Label ltest = (gridview.Rows[e.RowIndex].Cells[0].FindControl("lblDiscID")
as Label);
ltest is always null!