I have a dataset that I created programmaticall y and bind to a datagrid.
When I add a row and I .show the form I get an error "Error creating window
handle"
This only happens if I have the code to add the row active. If I comment it
out then the form loads successfully (without any records, obviously).
Below is the code:
'-----------------------------Code Starts
Here----------------------------------
Dim dsCategories As New DataSet
Dim tbl_Categories As New DataTable
tbl_Categories. Columns.Add("Ca tNumber",
System.Type.Get Type("System.St ring"))
tbl_Categories. Columns.Add("Ca tName",
System.Type.Get Type("System.St ring"))
tbl_Categories. Columns.Add("Ca tCode",
System.Type.Get Type("System.St ring"))
Dim drCurRow As DataRow = dsCategories.Ta bles("tbl_Categ ories").NewRow
drCurRow("CatNu mber") = "1"
drCurRow("CatNa me") = "Regular"
drCurRow("CatCo de") = "110"
dsCategories.Ta bles("tbl_Categ ories").Rows.Ad d(drCurRow)
grdCategories.D ataSource = dsCategories
'---------------------------------Code Ends
Here--------------------------------
I Hope this is the right newsgroup to post this.
--
Thank you for your help