1 Replies - 454 Views - Last Post: 06 October 2012 - 08:16 PM Rate Topic: -----

#1 thantanenorn1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-October 12

TextBox to DatagridView

Posted 06 October 2012 - 07:53 PM

Hello everyone, I have a 3 textbox, how can I transfer the value of the textbox into the datagridView ??? thanks
Is This A Good Question/Topic? 0
  • +

Replies To: TextBox to DatagridView

#2 thantanenorn1  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 4
  • Joined: 06-October 12

Re: TextBox to DatagridView

Posted 06 October 2012 - 08:16 PM





Here's my code but it has an error is says . "No row can be added to a DataGridView control that does not have columns. Columns must be added first."

Dim row As Integer = dgvCart.Rows.Count
Dim tb As TextBox() = New TextBox() {txtShipAddress, txtBookName}
dgvCart.Rows.Add()

For i As Integer = 0 To tb.Length - 1
dgvCart(i, row).Value = tb(0)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1