ashishbi is right...
Try this code..
<asp:GridView ID="GridView1" AutoGenerateColumns="false" runat="server"
onrowdatabound="GridView1_RowDataBound">
<Columns>
<asp:TemplateField HeaderText="Column 1">
<ItemTemplate>
<asp:TextBox ID="txtbox" Text='<%# Eval("Name") %>' runat="server"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
Public partial class test : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e) {
if (Page.IsPostBack)
{ }
else
{
DataTable dt = new DataTable();
dt.Columns.Add("Name", typeof(string));
dt.Rows.Add("Fatty acyl CoA from the cytosol reacts with carnitine in the outer mitochondrial membrane, forming fatty acyl carnitine");
dt.Rows.Add("Fatt acyl carnitine");
GridView1.DataSource = dt;
GridView1.DataBind();
}
}
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
var txt = e.Row.FindControl("txtbox") as TextBox;
txt.Text = txt.Text.Replace("acyl carnitine", "acyl-carnitine");
}
}
}