Tips & Tricks for ASP.NET - C#

Google site Search
Gridview Content Replace

public void replaceApproval(object sender, GridViewRowEventArgs e) {

        if (e.Row.RowType == DataControlRowType.DataRow)
        {

            Label mylabel = (Label)e.Row.FindControl("lblverified");

            if (mylabel.Text == "True")
                mylabel.Text = "Approved";
            else
                mylabel.Text = "Not Approved";

            //if (e.Row.Cells[3].Text== "True")
            //    e.Row.Cells[2].Text = "Approved";
            //else e.Row.Cells[2].Text = "Not Approved";
        }
       
  
   
   
    }

on the gridview control call this function

OnRowDataBound="replaceApproval"



Arvixe offers ASP.net hosting that's good for testing plugins. Here is a good arvixe review if you want to know more.

Comments
Write Comments
Name  
Email    
Comments  

Other Titles