Hi there,
I have a datatable that I am using as the source of my datagrid. The datagrid is a self referencing hierarchy. When I add a row to the datatable, it does not appear in the grid. If I add a second row, or click around in the grid it appears. It is as though the grid is not being repainted. I need to mention that this grid allows for drag and drop from another grid.
Code under my add button:
I have a datatable that I am using as the source of my datagrid. The datagrid is a self referencing hierarchy. When I add a row to the datatable, it does not appear in the grid. If I add a second row, or click around in the grid it appears. It is as though the grid is not being repainted. I need to mention that this grid allows for drag and drop from another grid.
Code under my add button:
nCount += 1
Dim dr As DataRow
dr = dtTable2.NewRow
dr("Item Number") = nCount
dr("ParentItem") = 0
dr("Item Desc") = ""
dr("Quantity") = 0
dr("UOM") = ""
dr("Vendor") = ""
dtTable2.Rows.Add(dr)
dgBOM.DataSource = dtTable2