在GRIDVIEW中有一个模板列checklist,加载完选择几项后,提交的时候,为什么判断都没有选中啊,附代码:
public DataSet Get_answer(string flag,string dyid, System.Web.UI.WebControls.GridView gv)
{
string id = " ";
string chosevalue = " ";//鑾峰彇閫変腑鐨勶肌锛忥饥
string chosetext = " ";
int count = 0;//鑾峰彇寰楀埌鐨勫垎鏁?
string question = " ";//鑾峰彇闂涓?
string ask = " ";//绛旀涓?
string okid = " ";
int sumcount = 0;
// int typecount = 0;
bool result = false;
DataSet ds = this.get_test(flag, dyid);
System.Data.DataTable dt = new DataTable( "answer ");
dt.Columns.Add( "control ");//鎻愰啋锛嬮鐨勫敮涓€鍙风爜
dt.Columns.Add( "id ");//棰樼殑鍞竴鍙风爜
dt.Columns.Add( "askquestion ");//鐢ㄦ埛绛旀
dt.Columns.Add( "ask ");//姝g‘绛旀
for (int i = 0; i < gv.Rows.Count; i++)
{
DataRow dr = dt.NewRow();
chosetext = " ";
if (gv.Rows[i].Cells[4].HasControls() == true)
{
if (gv.Rows[i].Cells[0].Text.