Spread ASP.NET 6.0 Product Documentation
TargetModel Property
See Also  Example Send Feedback
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > GroupDataModel Class : TargetModel Property


Glossary Item Box

Gets the sheet data model for the group target.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property TargetModel As ISheetDataModel
Visual Basic (Usage)Copy Code
Dim instance As GroupDataModel
Dim value As ISheetDataModel
 
value = instance.TargetModel
C# 
public ISheetDataModel TargetModel {get;}

Property Value

ISheetDataModel object containing the data model for the group

Example

This example groups the data model.
C#Copy Code
private void button1_Click(object sender, EventArgs e)
{
FarPoint.Web.Spread.Model.GroupDataModel gm = new FarPoint.Web.Spread.Model.GroupDataModel(FpSpread1.ActiveSheetView.DataModel);
FarPoint.Web.Spread.SortInfo[] sort = new FarPoint.Web.Spread.SortInfo[1];
sort[0] = new FarPoint.Web.Spread.SortInfo(0, true);
gm.Group(sort, System.Collections.Comparer.Default);
FpSpread1.ActiveSheetView.DataModel = gm;
String msg = gm.TargetModel.RowCount.ToString();
Response.Write("alert('" + msg + "')");
}
Visual BasicCopy Code
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim gm As New FarPoint.Web.Spread.Model.GroupDataModel(FpSpread1.ActiveSheetView.DataModel)
Dim sort(0) As FarPoint.Web.Spread.SortInfo
sort(0) = New FarPoint.Web.Spread.SortInfo(0, True)
gm.Group(sort, System.Collections.Comparer.Default)
FpSpread1.ActiveSheetView.DataModel = gm
String msg = gm.TargetModel.RowCount.ToString()
Response.Write("alert('" & msg & "')")
End Sub

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

© 2002-2012 GrapeCity, Inc. All Rights Reserved.