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


row
Row index of the cell
col
Column index of the cell

Glossary Item Box

Gets the value from the cell in the group.

Syntax

Visual Basic (Declaration) 
Public Overrides Function GetValue( _
   ByVal row As Integer, _
   ByVal col As Integer _
) As Object
Visual Basic (Usage)Copy Code
Dim instance As GroupDataModel
Dim row As Integer
Dim col As Integer
Dim value As Object
 
value = instance.GetValue(row, col)
C# 
public override object GetValue( 
   int row,
   int col
)

Parameters

row
Row index of the cell
col
Column index of the cell

Return Value

Object containing the value

Example

This example returns the value from the specified index.
C#Copy Code
protected void Button1_Click(object sender, EventArgs e)
{
  FarPoint.Web.Spread.Model.GroupDataModel gm;
  if ((FpSpread1.ActiveSheetView.DataModel) is FarPoint.Web.Spread.Model.GroupDataModel)
  {
        gm = (FarPoint.Web.Spread.Model.GroupDataModel)FpSpread1.ActiveSheetView.DataModel;
        if ((gm.TargetModel) is FarPoint.Web.Spread.Model.IRangeSupport)
        {
                FarPoint.Web.Spread.Model.IRangeSupport im = (FarPoint.Web.Spread.Model.IRangeSupport)gm.TargetModel;
                Object o;
                o = gm.GetValue(1, 1);
                String msg = o.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 FarPoint.Web.Spread.Model.GroupDataModel
If TypeOf (FpSpread1.ActiveSheetView.DataModel) Is FarPoint.Web.Spread.Model.GroupDataModel Then
gm = FpSpread1.ActiveSheetView.DataModel
If TypeOf (gm.TargetModel) Is FarPoint.Web.Spread.Model.IRangeSupport Then
Dim im As FarPoint.Web.Spread.Model.IRangeSupport = gm.TargetModel
Dim o As Object
            o = gm.GetValue(1, 1)
              Dim msg As String = o.ToString()
              Response.Write("alert('" & msg & "')")
        End If
  End If
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.