| 发表于:2007-02-08 14:48:043楼 得分:0 |
commandfield field = new commandfield(); field.showdeletebutton = true; thisgrid.columns.add(field); commandfield field = new commandfield(); field.showeditbutton = true; thisgrid.columns.add(field); protected void grid_rowcommand(object sender, gridviewcommandeventargs e) { try { int index = int.parse(e.commandargument.tostring()); if (grid.rows.count > 0) { if (e.commandname == "edit ") { } else if (e.commandname == "delete ") { } } else { return; } } catch { } } | | |
|