Thursday, February 4, 2010

HOW TO CUSTOMIZE DATAHEADER OF GRIDVIEW ?

protected void grvUserThread_RowCreated(object sender, GridViewRowEventArgs e)
{
try
{
if (e.Row.RowType == DataControlRowType.Header)
{
GridViewRow headerRow = e.Row;
Label lb = new Label();
lb = (Label)e.Row.FindControl("lblabc");
lb.Text = "Thread: " + Thread;
}
}
catch(Exception ex)
{
String errorMessage;
errorMessage = "Error: ";
errorMessage = String.Concat(errorMessage, ex.Message);
errorMessage = String.Concat(errorMessage, " Line: ");
errorMessage = String.Concat(errorMessage, ex.Source);
LCE.Configuration.ErrorLog("Forum/ReplyToThreads.cs", errorMessage);
}
}

No comments:

Post a Comment