protected void grb_customerID_CheckedChanged(object sender, EventArgs e)
    {
        //清除GridView中所有RadioButton的选中状态
        foreach (GridViewRow oldrow in gv_customerInfo.Rows)
        {
            ((RadioButton)oldrow.FindControl("grb_customerID")).Checked = false;
        }
        //查找当前行的RadioButton并将其Checked 状态设置为true

        RadioButton rb = (RadioButton)sender;
        GridViewRow row = (GridViewRow)rb.NamingContainer;
        ((RadioButton)row.FindControl("grb_customerID")).Checked = true;
    }

相关文章:

  • 2022-02-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-16
  • 2022-12-23
  • 2021-06-11
猜你喜欢
  • 2022-12-23
  • 2022-02-19
  • 2022-12-23
  • 2022-12-23
  • 2021-09-26
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案