请教获取gridview当前行某一列的值!!!!!!!!!!
我用的环境是vwd2005为什么提示GridViewRow row = GridView1.Rows[e.NewSelectedIndex]值无法转换
还需要import什么namespace或是其他吗?
protected void GridView1_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
GridViewRow row = GridView1.Rows[e.NewSelectedIndex]
if (row.RowState == DataControlRowState.Selected)
this.Label3.Text = row.Cells[1].Text.ToString();
this.txt1.Text ="你好"
end if
end sub
--------------------编程问答-------------------- 这样试试:
GridViewRow row =(gridviewrow)GridView1.Rows[e.NewSelectedIndex] --------------------编程问答-------------------- GridViewRow row = (GridViewRow )GridView1.Rows[e.NewSelectedIndex] --------------------编程问答-------------------- Dim kind2 As String = CType(GridView1.Rows(e.RowIndex).FindControl("kind21"), DropDownList).SelectedValue
Dim qty As String = CType(GridView1.Rows(e.RowIndex).FindControl("qty1"), TextBox).Text --------------------编程问答-------------------- GridViewRow row =(gridviewrow)GridView1.Rows[e.NewSelectedIndex]
系统提示gridviewrow是个类型不能用做表达式 --------------------编程问答-------------------- 哪位兄弟帮助下 --------------------编程问答-------------------- GridViewRow row = (GridViewRow )GridView1.Rows[e.NewSelectedIndex] --------------------编程问答-------------------- 正在学习中`` --------------------编程问答-------------------- 正在学习中
补充:.NET技术 , ASP.NET