Intersoft WebGrid Documentation
WebGridGroup Class
Members  Example  See Also  Send Feedback
ISNet.WebUI.WebGrid Namespace : WebGridGroup Class






WebGridGroup provides built-in grouping feature that automatically handles rows grouping based on specified Columns' value. This feature is powerful since users can perform grouping data per column using WebGrid.NET designer or programmatically.

Object Model

WebGridGroup Class

Syntax

Visual Basic (Declaration) 
<DescriptionAttribute()>
<SerializableAttribute()>
Public Class WebGridGroup 
   Inherits ISNet.WebUI.NamedObjectBase
   Implements ISNet.ICopyable, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.WebUI.INamedObject 
Visual Basic (Usage)Copy Code
Dim instance As WebGridGroup
C# 
[DescriptionAttribute()]
[SerializableAttribute()]
public class WebGridGroup : ISNet.WebUI.NamedObjectBase, ISNet.ICopyable, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.WebUI.INamedObject  
Delphi 
public class WebGridGroup = class(ISNet.WebUI.NamedObjectBase, ISNet.ICopyable, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.WebUI.INamedObject)
JScript 
DescriptionAttribute()
SerializableAttribute()
public class WebGridGroup extends ISNet.WebUI.NamedObjectBase implements ISNet.ICopyable, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.WebUI.INamedObject 
Managed Extensions for C++ 
[DescriptionAttribute()]
[SerializableAttribute()]
public __gc class WebGridGroup : public ISNet.WebUI.NamedObjectBase, ISNet.ICopyable, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.WebUI.INamedObject  
C++/CLI 
[DescriptionAttribute()]
[SerializableAttribute()]
public ref class WebGridGroup : public ISNet.WebUI.NamedObjectBase, ISNet.ICopyable, ISNet.IResetable, ISNet.Serialization.BinarySerialization.IBinarySerialize, ISNet.WebUI.INamedObject  

Example

 

The following example shows you how to create a WebGridGroup programmatically. It groups Country column.
C#Copy Code
private void WebGrid1_InitializeDataSource(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
{
        DataSet ds = new DataSet();
        oleDbDataAdapter1.Fill(ds);
        e.DataSource = ds;
}

private void WebGrid1_PrepareDataBinding(object sender, ISNet.WebUI.WebGrid.DataSourceEventArgs e)
{
        if(!IsPostBack)
        {
                WebGrid1.RetrieveStructure();           
        }

       WebGridGroup a = new WebGridGroup();
       a.ColumnMember = "Country";
       WebGrid1.RootTable.FilteredColumns.Add(a);        
}


private void WebGrid1_InitializeLayout(object sender, ISNet.WebUI.WebGrid.LayoutEventArgs e)
{
     e.Layout.AllowGrouping = ISNet.WebUI.WebGrid.Grouping.Yes;

     e.Layout.GroupByBoxVisible = true;
}

Remarks

Grouping is very essential function required by today's business application. WebGridGroup provides built-in grouping feature that automatically handles rows grouping based on specified Columns' value. This feature is powerful since users can perform grouping data per column using WebGrid.NET designer simply by right clicking on the column header and clicking on Group By This Field. Alternatively, you can also drag the column that you want to group and drop it in GroupBox. As always, with it's comprehensive UI interactions, WebGridGroup allows users to find information faster and more productive.

WebGrid.NET V5.0 maintain the improvement made to this feature, that is the capability to set individual GroupRow programmatically in code behind. Developers might want to display their own aggregated calculation to the child group rows and display them in GroupRow's text.

WebGrid.NET V5.0 provides enhancement of grouping feature. It allows you to perform grouping on different GroupInterval instead of the Column's Value. There are about 8 new GroupInterval modes that you can apply to the GroupColumn such as Text, Alphabetical, Date, Month, ShortTime and so on. You can always apply these GroupIntervals visually in the designer and doesn't require you to write any codes in order to make it work. This greatly increases your application's value by delivering better grouping capability to end users while saving development time with its easy to use designer. GroupInterval works perfectly in any combinations of different modes specified in each level of GroupColumn object. For instance, you can have CompanyName grouped with Alphabetical mode then followed by City with Text mode, and so on. Technically, the WebGrid.NET internal system automatically sorts each of the specified mode and perform the grouping in incremental method resulting in excellent performance.

WebGridGroup allows you to perform grouping on a column that has been grouped before. Using ColumnMember, you can configure a certain column that has been grouped can be grouped again based on another column. For instance, you have created a group column, in which the ColumnMember is configured to a "Country" column. Afterward, you can create second group column, in which the ColumnMember is configured to a "ContactName" column. 

WebGridGroup works well in VirtualLoad paging mode. When group columns exist in top level Table, all parent group rows will be rendered to clients but only a number of defined rows are rendered counted from the first parent group row. Therefore, it is able to keep server's bandwidth usage as minimal as possible, while displaying all necessary information. When users click on + to expand group row, the control will transparently and virtually load the child rows of that group row.

Another improvement to the grouping feature is the ability to customize the GroupMode and GroupRowFormatString of each level of group columns. The GroupMode enables you to specify which level of group column that will be expanded or collapsed initially, and the GroupRowFormatString allows you to specify different string formatting for each level of the group columns.

Inheritance Hierarchy

System.Object
   ISNet.WebUI.WebUIBaseClass
      ISNet.WebUI.NamedObjectBase
         ISNet.WebUI.WebGrid.WebGridGroup
            ISNet.WebUI.WebGrid.WebGridFilter

Requirements

Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family

See Also

©2012 Intersoft Solutions Corp. All Rights Reserved.