我想在RowCommand
中找到vb.net
事件的页脚值?
我在RowCreated
上分配页脚的值运行时间。
e.Row.Cells(2).Text = FOOTERVALUE
e.Row.Cells(1).Text = "Total Subjects"
此页脚适用于Parent Grid。我正在使用嵌套的gridview。
答案 0 :(得分:0)
Protected Sub Gridview1RowCommand(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewCommandEventArgs) Handles Gridview1.RowCommand
Dim Lblcolval = CType(dgrd_WWWH.FooterRow.FindControl("yourcolumn") ,Label)
End Sub
Protected Sub Gridview1_How_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles Gridview1.RowDataBound
If e.Row.RowType And DataControlRowType.Footer Or (e.Row.RowState And DataControlRowState.Edit) > 0 Then
Dim ddlresp As DropDownList = CType(e.Row.FindControl("ddlResp"), DropDownList)
SrchWhoBind(ddlresp)
ddlresp.SelectedValue = Convert.ToInt32(Session("Uname"))
End If
End Sub
答案 1 :(得分:0)
我得到了解决方案,只需要在rowDataBound
而不是rowCreated
中编写代码。