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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:28:27+00:00 2026-05-26T16:28:27+00:00

I am using vb.net 2010. I have a datagridview whose data source is a

  • 0

I am using vb.net 2010. I have a datagridview whose data source is a data table. I dynamically add rows to the data table.

Friend WithEvents DGVCusClient As System.Windows.Forms.DataGridView

      DGVCusClient.DataSource = m_table


      Private Sub DVGCusClient_DoubleClick(ByVal sender As Object, ByVal e As System.EventArgs) Handles DGVCusClient.DoubleClick

      Dim newRow As DataRow = m_table.NewRow()

      newRow.Item(colNameCustomer) = "Customer Name"

      newRow.Item(colNameClient) = "Client Name"

     m_table.Rows.Add(newRow)
    End Sub

After adding the new row, m_table is correct. However, DVGCusClient not only adds this row, but also adds two additional blank rows at the bottom. I have no idea where these two blank rows come from.

Why I use above code is as follows:

Use a data grid view to display data. When a user clicks a row, another form is opened which allows user to search/input some data.When the user closes the form, all data is saved to a data table and shown on the data grid view.

  • 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-26T16:28:28+00:00Added an answer on May 26, 2026 at 4:28 pm

    I think its adding additional row because of this line: m_table.Rows.Add(newRow)

    Because newRow.item will add new row to the table

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

Sidebar

Related Questions

I'm using vb.net 2010. I have a DataSet with a Table and data. MyDataSet1
I have created an office shared add in using Visual Studio 2010 .NET 4.0.
I'm new to using the C#/.NET programming Language and I have created a DataGridView
I'm using .NET 4 and VS 2010 and have the same issue in .NET
I'm wondering if using VS.Net 2010, I can have Entity Framework 3.5 code running
I am using vb.net 2010 and winforms and DataGridView. The DataGridView has a DataGridViewComboBox
I am using Autofac 2.4.5.724 under vb.net 2010. I have several classes without default
i'm using http://www.appelsiini.net/2010/jquery-chained-selects for a project. You can find the source here https://github.com/tuupola/jquery_chained this
Using VB.NET in Visual Studio 2010, I have two files: test2.aspx and test2.aspx.vb. The
I am using vb.net 2010 and I have created a program that uses sockets

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.