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
926
Add Child Row
posted

Hello,

I am trying to bind xamdatagrid using WCF service. My single stored procedure gets all the data.But its not in the parent-child format.Just no of records.

Code in WCF service:

Public Function Raise_Request_Records_Summary(ByVal Completion_Level As Int16) As DataTable Implements WCF_Service_Pay_Raise_Request.Raise_Request_Records_Summary

Dim Result As DataTable = New DataTable

Try

Dim TempTable As New DataTable

Dim SQL_Statement As String = "EXEC STORED PROCEDURE"

Dim MySQLConnection As New SqlClient.SqlConnection(AcctTools_Connection) Dim MySQLCommand As New SqlClient.SqlCommand(SQL_Statement, MySQLConnection)MySQLCommand.Parameters.Add("@Completion_Level", SqlDbType.VarChar, 5)

MySQLCommand.Parameters(0).Value = Completion_Level

Dim MyDataAdapter As New SqlClient.SqlDataAdapter(MySQLCommand)

MyDataAdapter.Fill(TempTable)

Result = TempTable.Clone

'Cleanup!

MyDataAdapter.Dispose()

MySQLCommand.Dispose()

MySQLConnection.Dispose()

End Try

Result.TableName = "Raise_Request_Records_Summary"

Return Result

End Function

CODE IN THE PAGE_LOADED:

Dim Completion_Level As Int16 = 2

If chk_Hide_Closed.IsChecked Then Completion_Level = 1

Dim Client As New AEDEV_WCF.AEDEV_Service_Pay_Raise_RequestClient Dim Display_Table As DataTable = Client.Raise_Request_Records_Summary(Completion_Level)

Client.Close()

XamDataGrid1.DataSource = Display_Table.Rows

I NEED GRID TO DISPLAY THIS:

Band1: Name(ABC), Submitted on

Band2: All the data under(ABC)

How can I achieve this ? I donot get plus sign ??