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


Glossary Item Box

Gets a value that is one more than the index of the last column on this sheet containing data.

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property NonEmptyColumnCount As Integer
Visual Basic (Usage)Copy Code
Dim instance As SheetView
Dim value As Integer
 
value = instance.NonEmptyColumnCount
C# 
public int NonEmptyColumnCount {get;}

Property Value

Integer number of the number of columns in this sheet that contain data

Remarks

This property is only available at run time.

Example

C#Copy Code
string conStr = "Provider=Microsoft.JET.OLEDB.4.0;data source= C:\\Patients2000.mdb";
string sqlStr = "SELECT * FROM Patients";
System.Data.OleDb.OleDbConnection conn = new System.Data.OleDb.OleDbConnection(conStr);
DataSet ds = new DataSet();
System.Data.OleDb.OleDbDataAdapter daCust = new System.Data.OleDb.OleDbDataAdapter(sqlStr, conn);
daCust.Fill(ds);
FpSpread1.DataSource = ds;

int i = FpSpread1.ActiveSheetView.NonEmptyColumnCount;
string msg = i.ToString();
Response.Write("alert('" + msg + "')");
Visual BasicCopy Code
Dim conStr As String = "Provider=Microsoft.JET.OLEDB.4.0;data source= C:\Patients2000.mdb"
Dim sqlStr As String = "SELECT * FROM Patients"
Dim conn As System.Data.OleDb.OleDbConnection = New System.Data.OleDb.OleDbConnection(conStr)
Dim ds As DataSet = New DataSet
Dim daCust As System.Data.OleDb.OleDbDataAdapter = New System.Data.OleDb.OleDbDataAdapter(sqlStr, conn)
daCust.Fill(ds)
FpSpread1.DataSource = ds

Dim i As Integer = FpSpread1.ActiveSheetView.NonEmptyColumnCount
Dim msg As String = i.ToString()
Response.Write("alert('" & msg & "')")

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.