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

  • Home
  • SEARCH
  • 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 8802899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T01:12:02+00:00 2026-06-14T01:12:02+00:00

Please I really need help on this one… I have 2 Forms Form1 and

  • 0

Please I really need help on this one… I have 2 Forms Form1 and Form2. In Form2 I Filter the DGV by Textboxchanged event

TBC Code

Dim dvSection As DataView
    Dim tableAdapter As New testDataSetTableAdapters.testingTableAdapter
    Dim ds As New testDataSet
    dv.Table = TestDataSet.testing
    dv.RowFilter = "CONVERT(TransactionID, System.String) LIKE '%" & TextBox1.Text & "%'"
    TestingDataGridView.DataSource = dv

I return the filtered data by assigning the dv as the new DataSource for Form1 DGV.

This Code Works

    Form1.TestingDataGridView1.DataSource = dv

Here in my question, in Form1 (with filtered data). I want to Edit the data in the DGV and then Update my MySql Table "testing". I am really confused about this cause I’ve never done this before. I usually Update my DGV and MySql Table by using the ff codes. How ever in this situation the ff codes doesn’t work.

 If MsgBox("Save Changes Made in this Cell?", MsgBoxStyle.YesNo, MsgBoxStyle.Exclamation) = DialogResult.Yes Then
        Me.Validate()
        Me.TestingBindingSource.EndEdit()
        Me.TestingTableAdapter.Update(Me.TestDataSet.testing)

    End If

I am really confused now, A little help would be really nice. Please and Thank You.

  • 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-06-14T01:12:03+00:00Added an answer on June 14, 2026 at 1:12 am

    I’m finally able to update the data view now… Let me post my codes here for future reference just in case someone also needs help. this is a sample project so I didn’t go much into the codes and went directly to how I solved it.

    Form1 has Datagridview(databound), 1 button "Form2"

    Codes for Form 1

    Public Class Form1
    
        Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            `TODO: This line of code loads data into the TestDataSet.testing table. You can move, or remove it, as needed.`
    
            Me.TestingTableAdapter.Fill(Me.TestDataSet.testing)
    
        End Sub
    
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            Form2.Show()
            ' Me.Hide()'
            Me.TestingBindingSource.DataSource = TestDataSet
            Me.TestingTableAdapter.Dispose()
            Me.TestingTableAdapter.Fill(Me.TestDataSet.testing)
    
        End Sub
    
        Private Sub TestingDataGridView1_CellEndEdit(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles TestingDataGridView1.CellEndEdit
    
            If MsgBox("Save Changes Made in this Cell?", MsgBoxStyle.YesNo, MsgBoxStyle.Exclamation) = DialogResult.Yes Then
                Me.Validate()
                Form2.TestingBindingSource().EndEdit()
                Me.TestingTableAdapter.Update(Me.TestDataSet.testing)
    
            End If
        End Sub
    End Class
    

    Form2 has DGV (databound), 2Buttons, "Return", "Save", and a textbox

     Private Sub TestingBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TestingBindingNavigatorSaveItem.Click
            Me.Validate()
            Me.TestingBindingSource.EndEdit()
            Me.TableAdapterManager.UpdateAll(Me.TestDataSet)
    
        End Sub
    
        Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            'TODO: This line of code loads data into the TestDataSet.testing table. You can move, or remove it, as needed.'
            Me.TestingTableAdapter.Fill(Me.TestDataSet.testing)
    
        End Sub
    
        Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
    
            Dim tableAdapter As New testDataSetTableAdapters.testingTableAdapter
            Dim ds As New testDataSet
    
            dv.Table = TestDataSet.testing
            dv.RowFilter = "CONVERT(TransactionID, System.String) LIKE '%" & TextBox1.Text & "%'"
            TestingDataGridView.DataSource = dv
            Form1.TestingDataGridView1.DataSource = dv
    
        End Sub
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    
            Form1.Show()
            Me.Hide()
    
            Me.TestingTableAdapter.Dispose()
            Me.TestingTableAdapter.Fill(Me.TestDataSet.testing)
        End Sub
    
        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            If MsgBox("Save Changes Made in this Cell?", MsgBoxStyle.YesNo, MsgBoxStyle.Exclamation) = DialogResult.Yes Then
                Me.Validate()
                Me.TestingBindingSource.EndEdit()
                Me.TestingTableAdapter.Update(Me.TestDataSet.testing)
    
            End If
        End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Good day. I could really use your help on this one. I have a
I really need your help. I have a database with latitude and longitude data,
I really need your help since I have a frustrating problem. I'm downloading data
I am trying to do this, and I really need help from expirienced fellows.
I really need help with the where clause below. Consider this xml <name xmlns=http://www.imsglobal.org/xsd/imslip_v1p0>
I really need some help. I have a List which has 4 columns and
Sorry if this is already posted, but I really need your help. What I
This is not really a programming question but please bear with me as I
I really do not understand how is this error happening at this code. Please
This is not a really Programming Question, but please bear with me as it's

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.