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

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top