Fw: [問題] GridView按鈕按下後無法產生RowCommand
※ [本文轉錄自 C_Sharp 看板 #1F62lohi ]
作者: epola (Epola) 看板: C_Sharp
標題: [問題] GridView按鈕按下後無法產生RowCommand
時間: Thu Jan 19 22:42:55 2012
請問各位高手,
最近我新學GridView遇到一個問題,
當在GridView中加入Button時 (commandname沒輸入)
由設計頁面去點選Button時,並不會主動生成
void xxxGridView_RowCommand(Object sender, GridViewCommandEventArgs e){略}
因為我需要取得目前取得的button屬於哪一個row
卻都會產生
void xxxGridView_SelectedIndexChanged(Object sender, EventArgs e)
而若是自行加上
<asp:GirdView ID="GirdView1" runat="server" OnRowCommand="xxxGridView_RowCommand">
</asp:GirdView>
還是會出現錯誤訊息。
不知道是否有哪個步驟出現錯誤 ?
謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 112.104.251.10
※ 發信站: 批踢踢實業坊(ptt.cc)
※ 轉錄者: epola (112.104.251.10), 時間: 01/19/2012 22:45:14
推
01/20 00:53, , 1F
01/20 00:53, 1F
→
01/20 00:55, , 2F
01/20 00:55, 2F
推
01/20 01:12, , 3F
01/20 01:12, 3F
→
01/20 03:54, , 4F
01/20 03:54, 4F
→
01/23 23:59, , 5F
01/23 23:59, 5F