回复 3楼jplzj的帖子
你购买的 Spread for .net 6.0,你是使用的VB.NET开发语言吧,以下是 Spread for WinForms 6.0 帮助文档中给出的一段示例代码:
- Private Sub fpSpread1_Error(ByVal sender As Object, ByVal e As FarPoint.Win.Spread.ErrorEventArgs) Handles fpSpread1.Error
- If e.EditError = Win.Spread.EditError.InvalidCellData Then
- If e.IsEditError = True Then
- e.Cancel = True
- MessageBox.Show(e.ErrorMessage)
- e.View.Sheets(0).Cells(e.Row, e.Column).BackColor = Color.Red
- End If
- End If
- End Sub
复制代码 |