Spread for ASP.NET 8.0 Product Documentation
AddColumn() Method
Example 


Adds a column to the data model after the last column.
Syntax
'Declaration
 
Public Overloads Sub AddColumn() 
'Usage
 
Dim instance As DefaultSheetDataModel
 
instance.AddColumn()
public void AddColumn()
Remarks

If you want to add more than one column, use the AddColumns method.

This method does not have an effect if the model is data bound.

Example
This example adds a new column to the model in the click event of a button.
private void Button1_Click(object sender, System.EventArgs e)
{
  FarPoint.Web.Spread.Model.DefaultSheetDataModel dm = (FarPoint.Web.Spread.Model.DefaultSheetDataModel)FpSpread1.ActiveSheetView.DataModel;
  dm.AddColumn();        
}
 Private Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim dm As FarPoint.Web.Spread.Model.DefaultSheetDataModel = CType(FpSpread1.ActiveSheetView.DataModel, FarPoint.Web.Spread.Model.DefaultSheetDataModel)
   dm.AddColumn()
 End Sub
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

Reference

DefaultSheetDataModel Class
DefaultSheetDataModel Members
Overload List
AddColumns Method
RemoveColumn Method
RemoveColumns Method

 

 


Copyright © GrapeCity, inc. All rights reserved.