|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
add row in binded datagridviewHi, help me please for this issue:
I have a master-details form binded to "Order" and "OrderDetails" A datagriedview is binded with the details. I want to fill the datagridview with a result of a query with fields that respect the orderdetails fields. I try to fill an array with the result of the query and then cycle it and use OrderDetailsDataGridView.Rows.Add(rowArray) but i got {"Impossible add row at code level in case of binding control association"} (sorry for that but i tried to traduce from italian errror) Any suggestion? I'm using vb.net 2005 and sql 2005 Thank you Dim row0 As String() = {Me.DataGridView1(0, 0).Value(), Me.DataGridView1(1,
0).Value(), Me.DataGridView1(2, 0).Value(), _ Me.DataGridView1(3, 0).Value(), Me.DataGridView1(4, 0).Value(), Me.DataGridView1(5, 0).Value(), _ Me.DataGridView1(6, 0).Value(), Me.DataGridView1(7, 0).Value(), Me.DataGridView1(8, 0).Value(), _ Me.DataGridView1(9, 0).Value()} Dim row1 As String() = {Me.DataGridView1(0, 1).Value(), Me.DataGridView1(1, 1).Value(), Me.DataGridView1(2, 1).Value(), _ Me.DataGridView1(3, 1).Value(), Me.DataGridView1(4, 1).Value(), Me.DataGridView1(5, 1).Value(), _ Me.DataGridView1(6, 1).Value(), Me.DataGridView1(7, 1).Value(), Me.DataGridView1(8, 1).Value(), _ Me.DataGridView1(9, 1).Value()} With OreDettaglioDataGridView.Rows .Add(row0) .Add(row1) End With Show quote "zacqa***@gmail.com" wrote: > can you paste your code? > > |
|||||||||||||||||||||||