作成日: 2024/05/28 最終更新日: 2024/05/28
文書種別
不具合
発生環境
SP9(10.0.4014.2013)
状況
現象確認済み
詳細
下記のセル型を持つセルがデザイナで設定されている場合、NullReferenceExceptionが発生して正常に開くことができません。
また、保存されたXMLファイルをデザイナ上やコード上で読み込んだ際にもNullReferenceExceptionが発生します。
- LabelCellType
- ImageCellType
- HyperLinkCellType
- TagCloudCellType
- ColumnHeaderFilterCellType
- FilterBarCellType
回避方法
デザイナ上での操作に関しては、回避策はありません。
保存されたXMLファイルをコード上で読み込む際に発生するNullReferenceExceptionについては、次のように該当のセル型を継承するセル型を作成し、XMLのセル情報をそれに変更することで回避できます。
保存されたXMLファイルをコード上で読み込む際に発生するNullReferenceExceptionについては、次のように該当のセル型を継承するセル型を作成し、XMLのセル情報をそれに変更することで回避できます。
[VB] Imports FarPoint.Web.Spread ・・・ Public Class CustomLabelCellType Inherits LabelCellType Public Overrides Function GetEditorControl(id As String, parent As TableCell, style As Appearance, margin As Inset, value As Object, upperLevel As Boolean) As Control Return New Label End Function End Class [SpreadXML] <!-- 変更前 --> <CellType class="FarPoint.Web.Spread.LabelCellType"> <AllowWrap>False</AllowWrap> <LabelCellType /> </CellType> <!-- 変更後 --> <CellType class="WebApplication1.CustomLabelCellType" assembly="WebApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null">> <AllowWrap>False</AllowWrap> <CustomLabelCellType /> </CellType>