求知识关于datagrid和gridview的,谢谢
DataGridCommandEventArgs e 的e.Item.ItemIndex到了
GridViewCommandEventArgs e 是什么?
for example:
protected void DgrdBb_RowCommand(object source,GridViewCommandEventArgs e)
{
if (e.CommandName == "Delete ")
{
DataTable objDT = dbll.bSwetswswjcjbb.GetDetailsList( "NULL ", String.Empty).Tables[0];
for (int i = 0; i < DgrdBb.Rows.Count; i++)
{
if (i != ★e.Item.ItemIndex★)
{
DataRow oldRow = objDT.NewRow();
oldRow[ "jcx "] = DgrdBb.Rows[i].Cells[0].Text;
oldRow[ "bd_mhcs "] = Convert.ToInt32(DgrdBb.Rows[i].Cells[1].Text);
oldRow[ "bd_fhcs "] = Convert.ToInt32(DgrdBb.Rows[i].Cells[2].Text);
------解决方案--------------------先顶