行をクリック可能なasp.netグリッドビューが必要です。
行インデックスに基づいてその行がクリックされたときに関数を呼び出したい。
RowDataBound イベントを使用しようとしましたが、機能しませんでした。
私は次のコードを使用しました
protected void PeopleGridView_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes["onmouseover"] = "this.style.cursor='hand';this.style.textDecoration='underline';";
e.Row.Attributes["onmouseout"] = "this.style.textDecoration='none';";
e.Row.Attributes["onclick"] = ClientScript.GetPostBackClientHyperlink(this.PeopleGridView, "Select$" + e.Row.RowIndex);
}
}
どこが間違っていますか?
他のページにリダイレクトしたくありません。同じページのテキストボックスに値を入力したい