On Tue, 06 Jun 2006 08:38:05 -0700, K B <ka**********@comcast.net>
wrote:
Hi,
Is there a way to change the EditText value on just the commandfield in
the first row. In the RowCreated event...
If e.Row.RowIndex = 0 Then
...change the edittext on the commandfield
Thanks,
Kit
*** Sent via Developersdex http://www.developersdex.com ***
Make sure you change the command row to a template first. Then this
code will do the trick:
protected void GridView1_RowCreated(object sender,
GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.RowIndex == 0)
{
LinkButton lb = (LinkButton)
e.Row.FindControl("LinkButton1");
lb.Text = "newtextbutton";
}
}
}
Peter Kellner
(posted the wrong post a minute ago)
Peter Kellner
http://peterkellner.net