1、加摸板列,在其中加多选框!
2、循环摸板列控键,如果被选中,把序号传出!
3、我也在找VS2003的下载地址,我前段时间下了个,但装了一半说缺少文件,这个我就不给你了,,呵呵,找到告我一声::
说的很笼统,这方面的例子很多,你在CSDN上用DATAGRID关键词搜把,很多。

解决方案 »

  1.   

    你用DataGrid中的IsSelected(Row);这个方法,你试试。至于VS2003的下载地址,我也在找呢。
      

  2.   

    http://expert.csdn.net/Expert/topic/1767/1767885.xml?temp=5.016506E-03
      

  3.   

    如果你需要选中的行数,你只需要在我的代码中加一个计数器count,每次添加记录时count++即可!
      

  4.   

    1. 先在DataGrid中加上CheckBox
    2. 例如在某个按钮事件中//先定义一个int 变量
    int i=0;
    foreach (DataGridItem di in DataGrid1.Items)
    {
       // Make sure this is an item and not the header or footer.
        if (di.ItemType == ListItemType.Item || di.ItemType == ListItemType.AlternatingItem)
       {

    // See if this one is Checked.
            if (((CheckBox)di.FindControl("CheckBox1")).Checked)
           {
               i+=1;
            }
        }

    }最后i的值就是你选择的行数