作成日: 2026/05/29 最終更新日: 2026/05/29
文書種別
不具合
発生環境
SP10 (10.0.4015.2013)
※SP9(10.0.4014.2013)では発生しません。
状況
回避方法あり
詳細
列や複数のセルに対してマスク編集型セル(MaskedEditCellType)を設定すると、アプリケーションの実行時に下記のエラーがコンソールに出力されます。
TypeError: Cannot read properties of null (reading '_events')
または
Sys.ArgumentNullException: Sys.ArgumentNullException: 値を Null にすることはできません。
回避方法
GetEditorControlメソッドをオーバーライドしたカスタムセルを作成する方法が有効です。
Imports FarPoint.Web.Spread
Public Class WebForm1
Inherits System.Web.UI.Page
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
If Page.IsPostBack Then Return
'Dim maskCell As New FarPoint.Web.Spread.Extender.MaskedEditCellType
Dim maskCell As New CustomMaskedEditCellType ' 回避策
・・・
End Sub
End Class
' 回避策
Friend Class CustomMaskedEditCellType
Inherits FarPoint.Web.Spread.Extender.MaskedEditCellType
Dim _editorControl As Control
Public Overrides Function GetEditorControl(id As String, parent As TableCell, style As Appearance, margin As Inset, value As Object, upperLevel As Boolean) As Control
If _editorControl Is Nothing Then
_editorControl = MyBase.GetEditorControl(id, parent, style, margin, value, upperLevel)
End If
Return _editorControl
End Function
End Class