Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6823485
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T21:47:17+00:00 2026-05-26T21:47:17+00:00

I am databinding my gridview in VB code behind. Because of this I know

  • 0

I am databinding my gridview in VB code behind. Because of this I know I can not refer to the NewValues when text is entered into one of the edit boxes. I need to retrieve the value of a column in the RowUpdating event.

Does anyone have a sample code or tutorial on how to do this?

I have tried to do this in a multide of ways, but each of my changes ends up breaking something else.
None of these three methods is working….

Dim DT34 As String = DirectCast(GridView4.Rows.FindControl("Textbox1"), TextBox).Text

Dim TB1 As Label = GridView4.Rows(e.NewEditIndex).Cells(0).FindControl("Label1")

Dim tb1 As TextBox = GridView4.Rows(e.RowIndex).Cells(0).FindControl("TextBox1")
Dim IDVal As String = tb1.Text

In the following code, I am believe it is finding the control but it is not returning the value that was entered into the textbox.

Dim tb As TextBox = DirectCast(GRD4.Rows(index1).FindControl("TextBox1"), TextBox)
updateDescription = tb.Text

My field has been converted to a Template field in the Gridview instead of Boundfield.
Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T21:47:18+00:00Added an answer on May 26, 2026 at 9:47 pm

    The code on this page seems to work quite nicely…

    http://www.aarongoldenthal.com/post/2009/04/19/Manually-Databinding-a-GridView.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm not clear about this.... When having a gridview on the View, is the
When databinding to an ASP .NET GridView, how does one change the background color,
I am databinding a GridView to an object datasource. The gridview contains a TemplateField
any good recommendations for databinding. i am starting to look into WPF more and
When doing databinding does one have to implement INotifyPropertyChanged on the datacontext in WPF?
I am using databinding and IDataErrorInfo style validation in a form. This form includes
I'm using a gridview to display and access a sql database and using databinding.
Has anyone managed to extend a GridView with default sorting? This seems pretty trivial
Say I have an array like so in my code behind: public static string[]
I need some help in rendering a dynamic gridview. Using the source code below,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.