Gridview 更新网格视图时未处理InvalidCastException

Gridview 更新网格视图时未处理InvalidCastException,gridview,Gridview,您好,我收到未处理的错误InvalidCastException请帮助我解决此问题 string att=((DropDownList)GridView1.Rows[e.RowIndex]。单元格[0]。控件[0])。文本尝试使用FindControl DropDownList idCombo = (DropDownList)GridView1.Rows[e.RowIndex].Cells[0].FindControl("comboID"); string att = idCombo.Se

您好,我收到未处理的错误
InvalidCastException
请帮助我解决此问题


string att=
((DropDownList)GridView1.Rows[e.RowIndex]。单元格[0]。控件[0])。文本

尝试使用FindControl

 DropDownList idCombo = (DropDownList)GridView1.Rows[e.RowIndex].Cells[0].FindControl("comboID");

 string att = idCombo.SelectedValue; 

尝试使用ID为的FindControl而不是控件[0]这是android吗?请提及您正在尝试的技术?