I am trying to bind an sqlce data set to a XamDataTree based on WPF > Style > Theming example provided in the Samples Browser for infragistics 12.2
I would like the parent node to the contain 2 columns as in the example. The fields used would be Assessment Date and AssessedBy.
The child node would be DatePrescribed.
How do i bind my datasource (shown below) to the xamdatatree as i am struggling with the examples i have found in the forums. I am using VB.
Public Shared Function GetClientAssProgHistory(ByVal clientid As Integer) As DataSet
' Initialize DataSet and name it Dim myDataSet As New DataSet("myDataSet")
'create the sql connection to the database Dim con As SqlCeConnection = New SqlCeConnection(My.Settings.myCompactDBConnectionString1)
'define the query Dim sqlquery As String sqlquery = "select AssessmentDate, AssessedBy, PresentProblems, DatePrescribed" & _ " from DClientAssessment ca left outer join DClientProgrammeHistory ph on ca.DClientAssessmentID = ph.DClientAssessmentID" & _ " left outer join dclientmaster c on ca.clientid = c.clientid " & _ " where c.clientid = '" & clientid & "'" & _ " order by AssessmentDate desc, DatePrescribed desc"
'define the sql commend Dim cmd As New SqlCeCommand(sqlquery, con)
' Initialize the SqlDataAdapter Dim daclienthistory As New SqlCeDataAdapter(cmd)
Try ' Fill the DataSet daclienthistory.Fill(myDataSet, "ClientHistory")
Catch ex As SqlCeException ' Catch and display any exceptions that may occur MessageBox.Show(ex.Message.ToString()) End Try
Return myDataSet End Function
Hello,
I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter.
Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Basically the Key of the child layout should match the Relation name of the DataSet and the TargetTypeName of both NodeLayouts should be DataRowView. Please let me know if you have further questions on this matter.
Looking forward for your reply.