Tuesday, January 17, 2012

Show the space in between the values of gridview

protected void gvRack_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
Label lblStatus = e.Row.FindControl("lblStatus") as Label;
Label lblRackNo = e.Row.FindControl("lblRackNo") as Label;
Label lblRackName = e.Row.FindControl("lblRackName") as Label;
lblRackNo.Text = lblRackNo.Text.Replace(" ", " "); //for showing the spaces in between the words

No comments: