Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. Visual Basic
  4. adding textbox in the datagridview

adding textbox in the datagridview

Scheduled Pinned Locked Moved Visual Basic
question
5 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Sonia Gupta
    wrote on last edited by
    #1

    can in add textboxes only in the first cell of datagridview? I have four rows in the datagriddview.

    B X 2 Replies Last reply
    0
    • S Sonia Gupta

      can in add textboxes only in the first cell of datagridview? I have four rows in the datagriddview.

      B Offline
      B Offline
      Billypon
      wrote on last edited by
      #2

      You should add textboxes as you adding images in the datagridview

      S 1 Reply Last reply
      0
      • B Billypon

        You should add textboxes as you adding images in the datagridview

        S Offline
        S Offline
        Sonia Gupta
        wrote on last edited by
        #3

        The textboxes do not appear as blinking cursors in the textboxes at runtime ? Thet behave like labels . even readonlky property is false. How can i make the the cursor to blink in the textboxes at runtime?

        1 Reply Last reply
        0
        • S Sonia Gupta

          can in add textboxes only in the first cell of datagridview? I have four rows in the datagriddview.

          X Offline
          X Offline
          Xandip
          wrote on last edited by
          #4

          Of course you can do this.. just put a textbox into the grid during design time, and hide it during the form_load. write the code to make it visible, during runtime, when you click on the first column of the datagrid.. you must add the code to adjust the size of the textbox inorder to make it look like a cell in the datagrid..

          The name is Sandeep

          S 1 Reply Last reply
          0
          • X Xandip

            Of course you can do this.. just put a textbox into the grid during design time, and hide it during the form_load. write the code to make it visible, during runtime, when you click on the first column of the datagrid.. you must add the code to adjust the size of the textbox inorder to make it look like a cell in the datagrid..

            The name is Sandeep

            S Offline
            S Offline
            Sonia Gupta
            wrote on last edited by
            #5

            I am using the following code Private Sub dg1_CellClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles dg1.CellClick If (e.ColumnIndex = 2) Then TextBox1.Visible = True TextBox1.Left = 42 TextBox1.Top = 19 * (Me.dg1.CurrentCell.RowIndex + 1) TextBox1.Height = dg1.CurrentRow.Cells(0).Size.Height TextBox1.Width = dg1.CurrentRow.Cells(0).Size.Width End If End Sub as the row index increases , the coordinates flaws increases.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups