Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
995
databinding dataset to XamDataTree
posted

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

Parents
No Data
Reply
  • 138253
    Offline posted

    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.

Children
No Data