Gets the number of columns in the model containing data (bound or unbound).
Syntax
Visual Basic (Declaration) | |
---|
Public Overrides ReadOnly Property NonEmptyColumnCount As Integer |
C# | |
---|
public override int NonEmptyColumnCount {get;} |
Property Value
Integer number that is one more than the index of the last column in the model that contains data
Remarks
Example
This example assigns values to the Spread data model and returns the number of non-empty columns and rows.
Visual Basic | Copy Code |
---|
PrivateSubPage_Load(ByValsenderAsSystem.Object,ByValeAsSystem.EventArgs)HandlesMyBase.Load
If(IsPostBack)Then
Return
EndIf
FpSpread1.ActiveSheetView.DataModel.SetValue(0,0,"First")
FpSpread1.ActiveSheetView.DataModel.SetValue(0,1,"Second")
FpSpread1.ActiveSheetView.DataModel.SetValue(0,2,"Third")
FpSpread1.ActiveSheetView.DataModel.SetValue(2,0,"Un")
FpSpread1.ActiveSheetView.DataModel.SetValue(2,1,"Deux")
FpSpread1.ActiveSheetView.DataModel.SetValue(2,2,"Trois")
DimmodelAsFarPoint.Web.Spread.Model.DefaultSheetDataModel=FpSpread1.ActiveSheetView.DataModel
ListBox1.Items.Add(Convert.ToString(model.NonEmptyColumnCount))
ListBox1.Items.Add(Convert.ToString(model.NonEmptyRowCount))
EndSub |
C# | Copy Code |
---|
privatevoidPage_Load(objectsender,System.EventArgse)
{
if(this.IsPostBack)return;
FpSpread1.ActiveSheetView.DataModel.SetValue(0,0,"First");
FpSpread1.ActiveSheetView.DataModel.SetValue(0,1,"Second");
FpSpread1.ActiveSheetView.DataModel.SetValue(0,2,"Third");
FpSpread1.ActiveSheetView.DataModel.SetValue(2,0,"Un");
FpSpread1.ActiveSheetView.DataModel.SetValue(2,1,"Deux");
FpSpread1.ActiveSheetView.DataModel.SetValue(2,2,"Trois");
FarPoint.Web.Spread.Model.DefaultSheetDataModelmodel=(FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel;
ListBox1.Items.Add(Convert.ToString(model.NonEmptyColumnCount));
ListBox1.Items.Add(Convert.ToString(model.NonEmptyRowCount));
} |
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