Class PassThroughGroupingResult
A default implementation of the IPassThroughGroupingResult with support for Linq queries. See the LinqGroupBy example.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Grouping
Assembly: Syncfusion.Grouping.Base.dll
Syntax
public class PassThroughGroupingResult : IPassThroughGroupingResult, IEnumerable, ITypedList
Constructors
PassThroughGroupingResult(String, NestedQueryResultsDelegate, Type, QueryGroupsDetailsDelegate, IEnumerable, IRecordUpdateHelper, String[])
Initializes a new instance of the PassThroughGroupingResult class.
Declaration
public PassThroughGroupingResult(string name, NestedQueryResultsDelegate nestedQueryHandler, Type itemType, QueryGroupsDetailsDelegate groupsDetailsHandler, IEnumerable sampleResults, IRecordUpdateHelper updateHelper, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
NestedQueryResultsDelegate | nestedQueryHandler | A NestedQueryResultsDelegate to retrieve the nested tables with totals on demand. |
System.Type | itemType | The data type of the items in this collection. |
QueryGroupsDetailsDelegate | groupsDetailsHandler | The QueryGroupsDetailsDelegate that retrieves the nested group details on demand. |
System.Collections.IEnumerable | sampleResults | Returns first few items of the results. |
Syncfusion.Grouping.IRecordUpdateHelper | updateHelper | A Syncfusion.Grouping.IRecordUpdateHelper. |
System.String[] | groupByColumns | The group by columns. |
PassThroughGroupingResult(String, NestedQueryResultsDelegate, Type, QueryGroupsDetailsDelegate, IEnumerable, String[])
Constructor for PassThroughGroupingResult.
Declaration
public PassThroughGroupingResult(string name, NestedQueryResultsDelegate nestedQueryHandler, Type itemType, QueryGroupsDetailsDelegate groupsDetailsHandler, IEnumerable sampleResults, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
NestedQueryResultsDelegate | nestedQueryHandler | A NestedQueryResultsDelegate to retrieve the nested tables with totals on demand. |
System.Type | itemType | The data type of the items in this collection. |
QueryGroupsDetailsDelegate | groupsDetailsHandler | The QueryGroupsDetailsDelegate that retrieves the nested group details on demand. |
System.Collections.IEnumerable | sampleResults | Returns first few items of the results. |
System.String[] | groupByColumns | The group by columns. |
PassThroughGroupingResult(String, NestedQueryResultsDelegate, Type, IEnumerable, IRecordUpdateHelper, String[])
Initializes a new instance of the PassThroughGroupingResult class.
Declaration
public PassThroughGroupingResult(string name, NestedQueryResultsDelegate nestedQueryHandler, Type itemType, IEnumerable sampleResults, IRecordUpdateHelper updateHelper, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
NestedQueryResultsDelegate | nestedQueryHandler | A NestedQueryResultsDelegate to retrieve the nested tables with totals on demand. |
System.Type | itemType | The data type of the items in this collection. |
System.Collections.IEnumerable | sampleResults | Returns first few items of the results. |
Syncfusion.Grouping.IRecordUpdateHelper | updateHelper | A Syncfusion.Grouping.IRecordUpdateHelper. |
System.String[] | groupByColumns | The group by columns. |
PassThroughGroupingResult(String, NestedQueryResultsDelegate, Type, IEnumerable, String[])
Constructor for PassThroughGroupingResult.
Declaration
public PassThroughGroupingResult(string name, NestedQueryResultsDelegate nestedQueryHandler, Type itemType, IEnumerable sampleResults, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
NestedQueryResultsDelegate | nestedQueryHandler | A NestedQueryResultsDelegate to retrieve the nested tables with totals on demand. |
System.Type | itemType | The data type of the items in this collection. |
System.Collections.IEnumerable | sampleResults | Returns first few items of the results. |
System.String[] | groupByColumns | The group by columns. |
PassThroughGroupingResult(String, NestedQueryResultsDelegate, Type, String[])
Initializes a new instance of the PassThroughGroupingResult class.
Declaration
public PassThroughGroupingResult(string name, NestedQueryResultsDelegate nestedQueryHandler, Type itemType, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
NestedQueryResultsDelegate | nestedQueryHandler | A NestedQueryResultsDelegate to retrieve the nested tables with totals on demand. |
System.Type | itemType | The data type of the items in this collection. |
System.String[] | groupByColumns | The group by columns. |
PassThroughGroupingResult(String, IEnumerable, Type, Object, QueryGroupsDetailsDelegate, IEnumerable, String[])
Initializes a new instance of the PassThroughGroupingResult class.
Declaration
public PassThroughGroupingResult(string name, IEnumerable results, Type itemType, object totals, QueryGroupsDetailsDelegate groupsDetailsHandler, IEnumerable sampleResults, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
System.Collections.IEnumerable | results | The collection that stores the grouping results. |
System.Type | itemType | The data type of the items in this collection. |
System.Object | totals | The Totals. |
QueryGroupsDetailsDelegate | groupsDetailsHandler | The QueryGroupsDetailsDelegate that retrieves the nested group details on demand. |
System.Collections.IEnumerable | sampleResults | Returns first few items of the results. |
System.String[] | groupByColumns | The group by columns. |
PassThroughGroupingResult(String, IEnumerable, Type, Object, IEnumerable, IRecordUpdateHelper, String[])
Initializes a new instance of the PassThroughGroupingResult class.
Declaration
public PassThroughGroupingResult(string name, IEnumerable results, Type itemType, object totals, IEnumerable sampleResults, IRecordUpdateHelper updateHelper, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
System.Collections.IEnumerable | results | The collection that stores the grouping results. |
System.Type | itemType | The data type of the items in this collection. |
System.Object | totals | The Totals. |
System.Collections.IEnumerable | sampleResults | Returns first few items of the results. |
Syncfusion.Grouping.IRecordUpdateHelper | updateHelper | A Syncfusion.Grouping.IRecordUpdateHelper. |
System.String[] | groupByColumns | The group by columns. |
PassThroughGroupingResult(String, IEnumerable, Type, Object, IEnumerable, QueryGroupsDetailsDelegate, IRecordUpdateHelper, String[])
Initializes a new instance of the PassThroughGroupingResult class.
Declaration
public PassThroughGroupingResult(string name, IEnumerable results, Type itemType, object totals, IEnumerable sampleResults, QueryGroupsDetailsDelegate groupsDetailsHandler, IRecordUpdateHelper updateHelper, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
System.Collections.IEnumerable | results | The collection that stores the grouping results. |
System.Type | itemType | The data type of the items in this collection. |
System.Object | totals | The Totals. |
System.Collections.IEnumerable | sampleResults | Returns first few items of the results. |
QueryGroupsDetailsDelegate | groupsDetailsHandler | The QueryGroupsDetailsDelegate that retrieves the nested group details on demand. |
Syncfusion.Grouping.IRecordUpdateHelper | updateHelper | A Syncfusion.Grouping.IRecordUpdateHelper. |
System.String[] | groupByColumns | The group by columns. |
PassThroughGroupingResult(String, IEnumerable, Type, Object, IEnumerable, String[])
Initializes a new instance of the PassThroughGroupingResult class.
Declaration
public PassThroughGroupingResult(string name, IEnumerable results, Type itemType, object totals, IEnumerable sampleResults, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
System.Collections.IEnumerable | results | The collection that stores the grouping results. |
System.Type | itemType | The data type of the items in this collection. |
System.Object | totals | The Totals. |
System.Collections.IEnumerable | sampleResults | Returns first few items of the results. |
System.String[] | groupByColumns | The group by columns. |
PassThroughGroupingResult(String, IEnumerable, Type, Object, String[])
Initializes a new instance of the PassThroughGroupingResult class.
Declaration
public PassThroughGroupingResult(string name, IEnumerable results, Type itemType, object totals, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.String | name | A name for this collection. |
System.Collections.IEnumerable | results | The collection that stores the grouping results. |
System.Type | itemType | The data type of the items in this collection. |
System.Object | totals | The Totals. |
System.String[] | groupByColumns | The group by columns. |
Properties
CaptionProperty
Gets or sets the value of caption property.
Declaration
public string CaptionProperty { get; set; }
Property Value
Type |
---|
System.String |
CountProperty
Gets or sets the value of count property.
Declaration
public string CountProperty { get; set; }
Property Value
Type |
---|
System.String |
DetailsProperty
Gets or sets the value of details property.
Declaration
public string DetailsProperty { get; set; }
Property Value
Type |
---|
System.String |
GroupByColumns
Gets the fields of query is grouped by. A query can be grouped by multiple levels.
Declaration
public string[] GroupByColumns { get; }
Property Value
Type |
---|
System.String[] |
KeyProperty
Gets or sets the value of key property.
Declaration
public string KeyProperty { get; set; }
Property Value
Type |
---|
System.String |
NestedQueryHandler
Gets or sets the value of nested query handler.
Declaration
public NestedQueryResultsDelegate NestedQueryHandler { get; set; }
Property Value
Type |
---|
NestedQueryResultsDelegate |
UpdateHelper
Gets or sets the update helper value.
Declaration
public IRecordUpdateHelper UpdateHelper { get; set; }
Property Value
Type |
---|
Syncfusion.Grouping.IRecordUpdateHelper |
Methods
ChangeResults(IEnumerable, Object, String[])
Applies the given settings to the current object.
Declaration
public void ChangeResults(IEnumerable results, object totals, params string[] groupByColumns)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.IEnumerable | results | Pass through grouping results. |
System.Object | totals | The Totals. |
System.String[] | groupByColumns | The group by columns. |
GetEnumerator()
Gets an enumerator that iterates through a collection.
Declaration
public IEnumerator GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator | The enumerator. |
GetGroupByKey(String, Object)
Gets the category of a new group that will be associated with the given item.
Declaration
public object GetGroupByKey(string column, object item)
Parameters
Type | Name | Description |
---|---|---|
System.String | column | A name that matches one of the strings return by GroupByColumns property values. |
System.Object | item | The item the group is associated with. |
Returns
Type | Description |
---|---|
System.Object | The group category for the given item. |
GetItemCount(Group, Object)
Gets the child count for a given group. This is the count that is displayed in the caption.
Declaration
public int GetItemCount(Group group, object item)
Parameters
Type | Name | Description |
---|---|---|
Group | group | The group in the grouping engine. |
System.Object | item | The item the group is associated with. |
Returns
Type | Description |
---|---|
System.Int32 | The child count for a given group. |
Exceptions
Type | Condition |
---|---|
System.InvalidOperationException | If the items's count is invalid or unavailable. |
GetItemProperties(PropertyDescriptor[])
Gets the System.ComponentModel.PropertyDescriptorCollection that represents the properties on each item used to bind data.
Declaration
public PropertyDescriptorCollection GetItemProperties(PropertyDescriptor[] listAccessors)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.PropertyDescriptor[] | listAccessors | An array of System.ComponentModel.PropertyDescriptor objects to find in the collection as bind-able. |
Returns
Type | Description |
---|---|
System.ComponentModel.PropertyDescriptorCollection | The System.ComponentModel.PropertyDescriptorCollection. |
GetItems(Group, Object)
Gets the items for a given group. These items can either be nested groups or records.
Declaration
public IEnumerable GetItems(Group group, object item)
Parameters
Type | Name | Description |
---|---|---|
Group | group | The group in the grouping engine. |
System.Object | item | The item the group is associated with. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | The items for a given group. |
Exceptions
Type | Condition |
---|---|
System.NotSupportedException | If the object is not enumerable. |
GetListItemType()
Gets the data type of the items in the data source. This information is used for instantiating and adding new items to the data source.
Declaration
public Type GetListItemType()
Returns
Type | Description |
---|---|
System.Type | The data type of the items in the data source. |
GetListName(PropertyDescriptor[])
Gets the name of the list.
Declaration
public string GetListName(PropertyDescriptor[] listAccessors)
Parameters
Type | Name | Description |
---|---|---|
System.ComponentModel.PropertyDescriptor[] | listAccessors | An array of System.ComponentModel.PropertyDescriptor objects, for which the list name is returned. |
Returns
Type | Description |
---|---|
System.String | Name of the list. |
GetNestedItems(RelationDescriptor, ChildTable, Object[], out Object)
Gets the nested items for a parent record when it is expanded state.
Declaration
public IEnumerable GetNestedItems(RelationDescriptor rd, ChildTable childTable, object[] keys, out object totals)
Parameters
Type | Name | Description |
---|---|---|
RelationDescriptor | rd | The RelationDescriptor that describes the relation. |
ChildTable | childTable | The child table where the new items will be added after this method returns. |
System.Object[] | keys | The identifier for the nested records. |
System.Object | totals | The number of child elements in the nested table or an object with summaries. |
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | The results of the query for the nested records. |
Remarks
In the implementation for this method you should execute a query on the related table and match the records to the criteria specified using the keys argument and the RelationDescriptor information specified with the rd argument.
GetSampleItems()
Gets the first few items of this result.
Declaration
public IEnumerable GetSampleItems()
Returns
Type | Description |
---|---|
System.Collections.IEnumerable | First few items. |
Remarks
The GridGroupingControl will loop through this items to determine the optimum width of columns.
GetTotals()
Gets the totals for the whole table. It can be an integer that represents the count that is displayed in the caption for the TopLevelGroup. You can also return a object which contains summaries for the whole table.
Declaration
public object GetTotals()
Returns
Type | Description |
---|---|
System.Object | Returns Totals. |
GetValue(Object, String)
Gets the current value of the given property.
Declaration
public static object GetValue(object item, string name)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item whose value needs to be retrieved. |
System.String | name | The property name. |
Returns
Type | Description |
---|---|
System.Object | Property value. |
GetValue(Object, String, out Object)
Gets the current value of the specified property.
Declaration
public static bool GetValue(object item, string name, out object value)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | The item whose value needs to be retrieved. |
System.String | name | Property name. |
System.Object | value | Property value. |
Returns
Type | Description |
---|---|
System.Boolean | True if this operation is successful; Otherwise False. |
Refresh()
Refreshes the control.
Declaration
public void Refresh()