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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:44:11+00:00 2026-05-30T10:44:11+00:00

I have one DataGridView named dgv . dgv is pretty much a plain gridview.

  • 0

I have one DataGridView named dgv.

dgv is pretty much a plain gridview. No bounded data. No columns added. It’s basically empty.

I also have one DataTable named dt.

I add rows and columns manually into dt.

dt.Columns.Add(New DataColumn("TexBox", GetType(String)))
dr = dt.NewRow()
dr("TextBox") = String.Empty
dt.Rows.Add(dr)

I then simply set dgv datasource into dt.

dgv.DataSource = dt
dgv.Refresh()

I then set the value for this particular cell.

dgv.Item(0,0).Value = "xxx"

Now when I run and execute all those commands. I happen to retrieve the gridview with that value indeed. The “xxx” cell appeared and currently it’s uneditable.

What I want to achieve is:
Allow this “xxx” cell to be editable. Preferrably if it can be inserted into a TextBox control inside the cell.

I googled and researched by myself on doing this. Yet I couldn’t find a correct resource.

Any help is appreciated.

  • 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-30T10:44:12+00:00Added an answer on May 30, 2026 at 10:44 am

    I simulate your code and the following works perfectly :

    Private Sub LoadData()
            Try
    
                Dim dt As New DataTable
    
                'Be carefull here because you right it TexBox instead TextBox  
                dt.Columns.Add(New DataColumn("TextBox", GetType(String)))
    
                Dim dr = dt.NewRow()
                dr("TextBox") = String.Empty
                dt.Rows.Add(dr)
    
                dgv.DataSource = dt
                dgv.Refresh()
                dgv.ReadOnly = False
                dgv.Columns(0).ReadOnly = False
                dgv.Item(0, 0).Value = "xxx"
    
            Catch ex As Exception
                MsgBox(ex.Message)
            End Try
        End Sub
    

    By Default when you edit a cell in a datagridview a textbox will popup on cell,
    so no need to make your own textbox
    (If you please, Don’t forget to marke my answer as Right one)

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

Sidebar

Related Questions

I have a list of data in datagridview. For example, one column is named
I have a DataGridView where one of the columns is a DataGridViewComboBoxColumn . When
I have a datagridview with a number of columns, one of these is a
I have a DataGridView in which one column has data that the user needs
I have a datagridview which is bound to some data. One of the fields
i have one datagridview.in my datagridview is having four row and three columns.after enter
I have a DataGridView that has three read only columns in it and one
I have one user control named XtraTreeList(It is combination of the treeview and datagridview)
I have three column in my datagridview .One is text ,one is Combo and
I have a DataGridView with one DataGridViewComboBoxColumn in my WinForms application. I need to

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.