void YourHandler(Object sender, EventArgs e)
{
  Button b = (Button)sender;
  if (b.CommandName == "....")  else
     ...
}

解决方案 »

  1.   

    设置这两个SelectCommand的CommandArguments,然后通过对CommandArguments来区别(事件参数中携带了该数据。
      

  2.   

    sorry, I was wrong, but how can you have two select button columna to have different commandname "select1"和"select2"? DataGrid1_SelectedIndexChanged will be not triggeredif you mean ItemCommand, then you can cast DataGridCommandEventArgs's CommandSource to Button and check their CommandName
      

  3.   

    谢谢两位,我通过转成模版列后,在DataGrid1_ItemCommand事件中处理。已搞定了。