【转】asp.net2.0中gridView的删除确认问题
asp.net2.0中gridView的删除确认问题
|
用惯了datagrid,第一次用gridView,倒有点不习惯.写删除确认时还有点不习惯,经过一番折磨,gridView的删除确认可以这样写:
if (e.Row.RowType == DataControlRowType.DataRow) { e.Row.Cells[0].Attributes.Add ("onclick", "javascript:return confirm('确定删除?')"); }
把上面这段放在GridView1_RowDataBound事件里或GridView1_RowCreated里都可以. |



e.Row.Cells[
}
浙公网安备 33010602011771号