Hi Palli,
I put the data member on hold and started invesigating a bigger problem which is that none of my search screens get filled.
These are screens that allow a search into the DB to fill a datagrid. The problem being the DGV never gets any data
Try
MyTable = CreateTable()
DataGridView.DataSource = MyTable
SetupDatagrid()
If txtSearchValue.Text.Trim.Length > 0 Then
Dim dt As DataTable = GetSearchResult(Replace(Replace(SearchFields(cmbSearchFields.SelectedIndex), " ", ""), ".", ""), txtSearchValue.Text)
If dt.Rows.Count > 0 Then
'fill table with search result
With MyTable
.Clear()
.BeginLoadData()
.Merge(dt)
.EndLoadData()
End With
End If
End If
'6.4.0 testing
Debug.WriteLine("Count 2 " & MyTable.TableName.ToString & "/" & MyTable.Rows.Count)
Debug.WriteLine("Count 3 " & DataGridView.DataSource.ToString)
Debug.WriteLine("Count 4 " & DataGridView.Rows.Count.ToString)
Catch ex As Exception
MessageBox.Show(ex.Message, "Database error", MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
Looking at the debug output Count 2 and 3 are OK but Count 4 shows 0 rows
I tried DGV invalidate and update but to no avail
I am scratching my head as to what to try next
Any ideas?
Jay