Spread for ASP.NET 7.0 Product Documentation
GetDataView(Boolean) Method
See Also  Example Support Options
FarPoint.Web.Spread Assembly > FarPoint.Web.Spread.Model Namespace > DefaultSheetDataModel Class > GetDataView Method : GetDataView(Boolean) Method


create
Whether to recreate the DataView

Glossary Item Box

Gets the DataView object associated with this model.

Syntax

Visual Basic (Declaration) 
Public Overloads Function GetDataView( _
   ByVal create As Boolean _
) As DataView
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetDataModel
Dim create As Boolean
Dim value As DataView
 
value = instance.GetDataView(create)
C# 
public DataView GetDataView( 
   bool create
)

Parameters

create
Whether to recreate the DataView

Return Value

DataView object containing the view of the data table

Example

This example returns the data view object associated with the model
C#Copy Code
DataTable dt = new DataTable("FarPoint"); 
dt.Columns.Add("Product"); 
dt.Rows.Add(new Object[] {"Spread"}); 
dt.Rows.Add(new Object[] {"Input Pro"}); 
DataRow nrow; 
nrow = dt.NewRow(); 
nrow["Product"] = "To Be Announced"; 
dt.Rows.Add(nrow); 
dt.AcceptChanges(); 
FarPoint.Web.Spread.Model.DefaultSheetDataModel dm = new FarPoint.Web.Spread.Model.DefaultSheetDataModel(dt); 
FpSpread1.ActiveSheetView.DataModel = dm; 
FpSpread1.ActiveSheetView.Columns[0].Width = 240; 
DataRowView drv; 
DataView dv; 
drv = dm.GetDataRow(1); 
dv = dm.GetDataView(false); 
Visual BasicCopy Code
Dim dt As New DataTable("FarPoint")
dt.Columns.Add("Product")
dt.Rows.Add(New Object() {"Spread"})
dt.Rows.Add(New Object() {"Input Pro"})
Dim nrow As DataRow
nrow = dt.NewRow()
nrow("Product") = "To Be Announced"
dt.Rows.Add(nrow)
dt.AcceptChanges()
Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel = New FarPoint.Web.Spread.Model.DefaultSheetDataModel(dt)
FpSpread1.ActiveSheetView.DataModel = dm
FpSpread1.ActiveSheetView.Columns(0).Width = 240
Dim drv As DataRowView
Dim dv As DataView
drv = dm.GetDataRow(1)
dv = dm.GetDataView(False)

Requirements

Target Platforms: Windows 7, Windows 8, Windows Vista, Windows Server 2000, Windows 2000 Professional, Windows XP Professional, Windows NT 4.0 Workstation, SP6, Windows NT 4.0 Server, SP6

See Also

© 2002-2014 ComponentOne, a division of GrapeCity. All Rights Reserved.