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


row
Row index of the cell
column
Column index of the cell

Glossary Item Box

Determines whether the value in the cell of the specified row and column can be edited.

Syntax

Visual Basic (Declaration) 
Public Overrides Function IsEditable( _
   ByVal row As Integer, _
   ByVal column As Integer _
) As Boolean
Visual Basic (Usage)Copy Code
Dim instance As DefaultSheetDataModel
Dim row As Integer
Dim column As Integer
Dim value As Boolean
 
value = instance.IsEditable(row, column)
C# 
public override bool IsEditable( 
   int row,
   int column
)

Parameters

row
Row index of the cell
column
Column index of the cell

Return Value

true if the cell contents can be edited; false otherwise

Remarks

To check if a cell is empty, use the IsEmpty method.

Example

This example binds the DefaultSheetDataModel to a DataTable and the values of the IsColumnBound, IsEditable, IsEmpty and IsRowUsed are returned to a list box.
C#Copy Code
Private void Page_Load(object sender, System.EventArgs e)
{
  If (this.IsPostBack) Return;

  bool b, b1, b2, b3;
  DataTable dt = New DataTable("FarPoint");
  dt.Columns.Add("Product");
  dt.Rows.Add(New Object[] {"SpreadWebv2"});
  dt.Rows.Add(New Object[] {"InputPro for WinForms"});
  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;
  b = dm.IsColumnBound(0);
  b1 = dm.IsEditable(0,0);
  b2 = dm.IsEmpty();
  b3 = dm.IsRowUsed(1);
  ListBox1.Items.Add(b.ToString());
  ListBox1.Items.Add(b1.ToString());
  ListBox1.Items.Add(b2.ToString());
  ListBox1.Items.Add(b3.ToString());
}
Visual BasicCopy Code
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

   If (Me.IsPostBack) Then Return

   Dim b, b1, b2, b3 As Boolean
   Dim dt As New DataTable("FarPoint")
   dt.Columns.Add("Product")
   dt.Rows.Add(New Object() {"SpreadWebv2"})
   dt.Rows.Add(New Object() {"InputPro for WinForms"})
   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
   b = dm.IsColumnBounded(0)
   b1 = dm.IsEditable(0, 0)
   b2 = dm.IsEmpty()
   b3 = dm.IsRowUsed(1)
   ListBox1.Items.Add(b.ToString())
   ListBox1.Items.Add(b1.ToString())
   ListBox1.Items.Add(b2.ToString())
   ListBox1.Items.Add(b3.ToString())

 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

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