GridView problem

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
 
G

Guest

 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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top