Saturday, October 16, 2010

How to put value from outside gridview control?

protected void GridViewRetail_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lblTimeStampHC = e.Row.FindControl("lblTimeStampHC") as Label;
if (lblTimeStampHC != null)
{
if (lblTimeStampHC.Text == string.Empty)
{
lblTimeStampHC.Text = "anything outside of gridview control";
}
}
}
}