GrapeCity.Win.MultiRow Namespace > Row Class : ErrorText Property |
<BrowsableAttribute(False)> <DefaultValueAttribute()> Public Property ErrorText As String
[Browsable(false)] [DefaultValue()] public string ErrorText {get; set;}
void gcMultiRow1_RowValidating(object sender, CellCancelEventArgs e) { if (e.CellName == "Name" && this.gcMultiRow1[e.RowIndex, "Name"].Value == null) { e.Cancel = true; // Set the error text to display why the cell validating failed. this.gcMultiRow1.Rows[e.RowIndex].ErrorText = "The student name can't be empty, please input the name."; } else { this.gcMultiRow1.Rows[e.RowIndex].ErrorText = string.Empty; } }
Private Sub gcMultiRow1_RowValidating(ByVal sender As Object, ByVal e As CellCancelEventArgs) Handles gcMultiRow1.RowValidating If e.CellName = "Name" AndAlso Me.gcMultiRow1(e.RowIndex, "Name").Value = Nothing Then e.Cancel = True ' Set the error text to display why the cell validating failed. Me.gcMultiRow1.Rows(e.RowIndex).ErrorText = "The student name can't be empty, please input the name." Else Me.gcMultiRow1.Rows(e.RowIndex).ErrorText = String.Empty End If End Sub
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2