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. How to Add Text in textbox into datagrid?

How to Add Text in textbox into datagrid?

Scheduled Pinned Locked Moved Visual Basic
tutorialhelpquestion
3 Posts 2 Posters 0 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.
  • E Offline
    E Offline
    Eunice VB junior
    wrote on last edited by
    #1

    Hi , I'm trying to add the text in textbox into a datagrid. But i failed to add it into datagrid. After i click 'Add' button, nothing appear in the datagrid. Can anyone guide me to solve the problem? Thanks in advanced. Here is my codes: Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click Try Dim dgBarCode As New DataGridTableStyle Dim HBarCode As New DataGridTextBoxColumn HBarCode.MappingName = Me.txtHBarCode.Text HBarCode.HeaderText = "HBarCode" HBarCode.Width = 50 dgBarCode.GridColumnStyles.Add(HBarCode) Dim EMIBarCode As New DataGridTextBoxColumn EMIBarCode.MappingName = Me.txtEMIBarCode.Text EMIBarCode.HeaderText = "EMIBarCode" EMIBarCode.Width = 50 dgBarCode.GridColumnStyles.Add(EMIBarCode) Me.dgResult.TableStyles.Add(dgBarCode) Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub Thanks, Eunice

    V 1 Reply Last reply
    0
    • E Eunice VB junior

      Hi , I'm trying to add the text in textbox into a datagrid. But i failed to add it into datagrid. After i click 'Add' button, nothing appear in the datagrid. Can anyone guide me to solve the problem? Thanks in advanced. Here is my codes: Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Add.Click Try Dim dgBarCode As New DataGridTableStyle Dim HBarCode As New DataGridTextBoxColumn HBarCode.MappingName = Me.txtHBarCode.Text HBarCode.HeaderText = "HBarCode" HBarCode.Width = 50 dgBarCode.GridColumnStyles.Add(HBarCode) Dim EMIBarCode As New DataGridTextBoxColumn EMIBarCode.MappingName = Me.txtEMIBarCode.Text EMIBarCode.HeaderText = "EMIBarCode" EMIBarCode.Width = 50 dgBarCode.GridColumnStyles.Add(EMIBarCode) Me.dgResult.TableStyles.Add(dgBarCode) Catch ex As Exception MessageBox.Show(ex.Message) End Try End Sub Thanks, Eunice

      V Offline
      V Offline
      Vimalsoft Pty Ltd
      wrote on last edited by
      #2

      Good Morning Eunice You see, you cannot be a good Developer if you dont try to do something yourself , before you aks someone else. Its been hours since you posted this qestion and no one answers you. its not because we dont know, its because the answer to that is very simple, and it need only Googling or a Book. before you post a question in a Forum you must first make a research and try to find answers yourself. here is what i googled and what you should have done 8 hours ago. http://www.google.co.za/search?hl=en&q=How+to+Add+Text+in+textbox+into+datagrid+in+vb.net&meta=[^] Hope this helps Thanks

      Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

      E 1 Reply Last reply
      0
      • V Vimalsoft Pty Ltd

        Good Morning Eunice You see, you cannot be a good Developer if you dont try to do something yourself , before you aks someone else. Its been hours since you posted this qestion and no one answers you. its not because we dont know, its because the answer to that is very simple, and it need only Googling or a Book. before you post a question in a Forum you must first make a research and try to find answers yourself. here is what i googled and what you should have done 8 hours ago. http://www.google.co.za/search?hl=en&q=How+to+Add+Text+in+textbox+into+datagrid+in+vb.net&meta=[^] Hope this helps Thanks

        Vuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za

        E Offline
        E Offline
        Eunice VB junior
        wrote on last edited by
        #3

        Hi Vuyiswa, thanks for the advice. Actually i did research as well. But maybe not enough. :). I should have worked harder. Anyway, thanks for the link. It does help me. regards, eunice

        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