GridView problem

  • Thread starter Thread starter Sze
  • Start date Start date
S

Sze

Private Sub GridViewLocalChargeDetail_RowUpdating(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles
GridViewLocalChargeDetail.RowUpdating

Dim txtModBillingType As TextBox =
DirectCast(GridViewLocalChargeDetail.Rows(e.RowIndex).FindControl("txtBillingType"),
TextBox)
When I set the column 's visible = false
the txtModBillingtype.text become blank.

I don't want to display the column, but I need to get the value

Please help.
thanks in advance
 
 Private Sub GridViewLocalChargeDetail_RowUpdating(ByVal sender As Object,
ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles
GridViewLocalChargeDetail.RowUpdating

     Dim txtModBillingType As TextBox =
DirectCast(GridViewLocalChargeDetail.Rows(e.RowIndex).FindControl("txtBilli ngType"),
TextBox)
When I set the column 's visible = false
 the txtModBillingtype.text become blank.

I don't want to display the column, but I need to get the value

Please help.
thanks in advance

You can get a datakey from the current row

GridViewLocalChargeDetail.DataKeys[e.RowIndex].Value

and use it to request the data from the datasource
 
Back
Top