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 8970925
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:49:42+00:00 2026-06-15T17:49:42+00:00

I have a datagrid in VB.NET class. The cells are editable. Is there any

  • 0

I have a datagrid in VB.NET class. The cells are editable. Is there any way to trigger a function when each of the cells are edited?

  • 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-15T17:49:44+00:00Added an answer on June 15, 2026 at 5:49 pm

    Yes, the CellValueChanged Event:
    http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.cellvaluechanged.aspx

        Private Sub DataGridView1_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
           'do something
        End Sub
    

    EDIt as per your comment:
    Yes you could save the current value to a class level variable on BeginEdit and retreieve it in the CellValueChanged event:

    Private cellValue As String = String.Empty
    
    Private Sub DataGridView1_CellBeginEdit(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellCancelEventArgs) Handles DataGridView1.CellBeginEdit
        cellValue = DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex).Value.ToString
    End Sub
    
    Private Sub DataGridView1_CellValueChanged(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DataGridView1.CellValueChanged
        MessageBox.Show("row index: " & e.RowIndex & Environment.NewLine & "old value: " & cellValue)
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a datagrid in C#.net I have made some columns in grid editable.
I have a asp.net application.there is a databinding section to a datagrid.But there have
I have a WinForms .NET datagrid whose data source is a List<cLineItem> called lines.
I am working on asp.net 3.5 application. I have a datagrid. I want to
I am new ASP.NET and I have never used a GridView or DataGrid, but
I have a DataGrid that represents layers - each row is an image on
I have a C# .NET 2.0 project A (class library) that has a form
I am working with windows application. I have a datagrid in vb.net. Its first
I have a ASPX.NET DataGrid and im trying to USE a select LIKE 'X'%
I'm creating a user approval interface leveraging the .Net Membership class. I have a

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.