foreach (DataGridItem i in MyDataGrid.Items)
   {
    checkBox = (CheckBox) i.FindControl ("SelectCheckBox");//SelectCheckBox为控件的ID

    if (checkBox.Checked)
    {
     type = MyDataGrid.Items[index].Cells[1].Text;//DataGrid中某行某列的值Items-行 Cells-列
     dropDownList = (DropDownList) i.FindControl ("subtype");
     subType = dropDownList.SelectedItem.Value.ToString();//提取下拉框选中值的索引Text是取得选中的值
    }

    index += 1 ;
   }

相关文章:

  • 2021-11-02
  • 2021-05-15
  • 2021-08-04
  • 2022-12-23
  • 2022-12-23
  • 2022-02-24
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-07-19
  • 2021-08-08
  • 2022-12-23
相关资源
相似解决方案