Hi,
In my web application, I am getting record in GridView from DataBase. I want to add LinkButton on ID( ID is a column in Table). What will be the code. plz, help me.
Thanks.
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Javeed M ShaikhPosted Oct 31, 2011, 1:10 PM
add the link button in the template column and in the rowdatabound you can get the row details:
sample snippet...
than in code behind...
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
// check if it a gridview row and datarow
// LinkButton link1 = gridviewrow.FindControl("link1") as LinkButton;
}