Home Forums WinForms controls Xceed Grid for WinForms Master/Detail Issue Reply To: Master/Detail Issue

User (Old forums)
Member
Post count: 23064

JUst to clear up everything here is the code directly from VS:

clsHelperFunctions.PopulateDatasetTables(cnnSQL, m_customerdDataSet, “RepairsInProcess”, _
“SELECT * FROM vwInprocess WHERE BusinessUnitID = ” & UserInfo.UserBU)

Dim colPrimaryKey(0) As DataColumn
colPrimaryKey(0) = m_customerdDataSet.Tables(“RepairsInProcess”).Columns(“RO_NBR”)
m_customerdDataSet.Tables(“RepairsInProcess”).PrimaryKey = colPrimaryKey

clsHelperFunctions.PopulateDatasetTables(cnnSQL, m_customerdDataSet, “AssignedTechs”, _
“SELECT * FROM vwAssignedTechnicians WHERE BusinessUnitID = ” & UserInfo.UserBU)

Dim dataRelate As New DataRelation(“RepairsInProcessTechs”, _
m_customerdDataSet.Tables(“RepairsInProcess”).Columns(“RO_NBR”), _
m_customerdDataSet.Tables(“AssignedTechs”).Columns(“RO_NBR”), True)
m_customerdDataSet.Relations.Add(dataRelate)

gcStatus.SetDataBinding(m_customerdDataSet.Tables(0), “”)
gcStatus.SynchronizeDetailGrids = True

Dim detailTechGrid As New DetailGrid()
detailTechGrid.SetDataBinding(m_customerdDataSet.Tables(0), “RepairsInProcessTechs”)
detailTechGrid.HeaderRows.Add(New ColumnManagerRow())
detailTechGrid.Collapsed = True

gcStatus.DetailGridTemplates.Add(detailTechGrid)
gcStatus.UpdateDetailGrids()
gcStatus.EndInit()

I have also tried creating a typed dataset and creating the relationship in that dataset and I get the same error as I posted in my original post.

Imported from legacy forums. Posted by Mitchel (had 330 views)