Hello,
How can we get the multiple grouping done in xamdatgrid ?Rather I need a hierarchail data in the grid.
My resultsets from the service gives me all the records in a plain gridview.I need to group it by "Name" and "Submitted on" fields.And I need both the fields on the same line. Can we do this ?
I am trying to bind xamdatagrid using WCF service.
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
Try
Dim SQL_Statement As String = "EXEC STORED PROCEDURE"
Dim MySQLCommand As New SqlClient.SqlCommand(SQL_Statement, MySQLConnection)
MySQLCommand.Parameters(0).Value = Completion_Level
MyDataAdapter.Fill(TempTable)
Result = TempTable.Clone
'Cleanup!
MyDataAdapter.Dispose()
MySQLCommand.Dispose()
MySQLConnection.Dispose()
End Try
Result.TableName = "Raise_Request_Records_Summary"
End Function
CODE IN THE PAGE_LOADED:
If chk_Hide_Closed.IsChecked Then Completion_Level = 1
Client.Close()
I NEED GRID TO DISPLAY THIS:
Band1: Name(ABC), Submitted on
Band2: All the data under(ABC)
How can I achieve this ?
Thanks
I think what you need is documented here:
Programmatically Sort and Group Fields
http://help.infragistics.com/Help/NetAdvantage/WPF/2008.2/CLR3.X/html/xamData_Programmatically_Sort_and_Group_Fields.html
using Infragistics.Windows.DataPresenter;...FieldSortDescription deptSort = new FieldSortDescription();deptSort.Direction = System.ComponentModel.ListSortDirection.Descending;deptSort.FieldName = "department";deptSort.IsGroupBy = true;FieldSortDescription salarySort = new FieldSortDescription();salarySort.Direction = System.ComponentModel.ListSortDirection.Descending;salarySort.FieldName = "salary";//Code for xamDataGridthis.xamDataGrid1.FieldLayouts[0].SortedFields.Clear();this.xamDataGrid1.FieldLayouts[0].SortedFields.Add(deptSort);this.xamDataGrid1.FieldLayouts[0].SortedFields.Add(salarySort);//Code for xamDataCarouselthis.xamDataCarousel1.FieldLayouts[0].SortedFields.Clear();this.xamDataCarousel1.FieldLayouts[0].SortedFields.Add(deptSort);this.xamDataCarousel1.FieldLayouts[0].SortedFields.Add(salarySort);//Code for xamDataPresenterthis.xamDataPresenter1.FieldLayouts[0].SortedFields.Clear();this.xamDataPresenter1.FieldLayouts[0].SortedFields.Add(deptSort);this.xamDataPresenter1.FieldLayouts[0].SortedFields.Add(salarySort);...