Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
コード ビハインドから OnRowDataBound メソッド名を設定するにはどうすればよいですか?
Aspx コード:
OnRowDataBound = "gvResults_RowDataBound"
コードビハインドからそれを設定する方法は?
gvResults.Attributes["OnRowDataBound"] = "gvResults_RowDataBound";
動作しません。
RowDataBoundGridView からイベント ハンドラーを使用する必要があります。
RowDataBound
gvResults.RowDataBound += gvResults_RowDataBound;