Show / Hide Table of Contents

    IDwMeta.Groups Property

    .NET Standard 2.x

    Gets the properties for the Groups defined in the DataWindow object.

    Namespace: DWNet.Data

    Assembly: DWNet.Data.dll

    Syntax

    IMetaList<IGroupMeta> Groups { get; }
    

    Return

    DWNet.Data.IMetaList<IGroupMeta>

    The properties for the Groups defined in the DataWindow object.

    Examples

    The following code example demonstrates how to use the Groups property.

    using DWNet.Data;
    using System;
    
    namespace Appeon.ApiDoc.IDwMetaExamples
    {
        public class GroupsExample
        {
            private readonly SchoolContext _context;
    
            public GroupsExample(SchoolContext dataContext)
            {
                // Sets the data context
                _context = dataContext;
            }
    
            public void Example()
            {
                // Instantiates datastore with datawindow: d_studentgrade_groupsort
                var datastore = new DataStore("d_studentgrade_groupsort", _context);
    
                datastore.Retrieve();
    
                // Gets the properties for the Groups keyword.
                var groupMetas = datastore.DwMeta.Groups;
                Console.WriteLine("Groups Count: {0}", groupMetas.Count);
    
                foreach (var item in groupMetas)
                {
                    foreach (var byItem in item.By)
                    {
                        Console.WriteLine("Level: {0}; By: {1}; Sort: {2}",
                            item.Level, byItem.Expression, item.Sort.Expression);
                    }
                }
    
                /*This code produces the following output:
                
                Groups Count: 1
                Level: 1; By: courseid; Sort: count(studentid for group 1) A
                */
            }
        }
    }
    

    Example Refer To

    Model Class: D_Studentgrade_Groupsort
    DataWindow File: d_studentgrade_groupsort

    Applies to

    .NET Standard

    2.x

    Back to top Generated by Appeon