GrapeCity.Win.MultiRow Namespace > Cell Class : ShowWaveLine Property |
<BrowsableAttribute(False)> <DefaultValueAttribute()> Public Property ShowWaveLine As Boolean
Dim instance As Cell Dim value As Boolean instance.ShowWaveLine = value value = instance.ShowWaveLine
[Browsable(false)] [DefaultValue()] public bool ShowWaveLine {get; set;}
Set this property to true to display an underline at the bottom of the cell.
You can use this property with the cell's ToolTipText property when you need to show error information to the user. Set this property to true and set the ToolTipText to the error string. An underline is then displayed at the bottom of the cell. When the pointer is over the cell, the ToolTipText is displayed. Also, you can change the underline's color using the WaveLineColor property. If you want to display the underline in edit mode, set GcMultiRow's GcMultiRow.ShowWaveLineInEditingStatus property to true.
void gcMultiRow_CellValidating(object sender, CellValidatingEventArgs e) { if (e.CellName == "Age") { int age = int.Parse(e.FormattedValue.ToString()); if (age < 0 || age > 100) { e.Cancel = true; // Show a wave line to notify the user there are errors. this.gcMultiRow1[e.RowIndex, e.CellIndex].ShowWaveLine = true; this.gcMultiRow1.EndEdit(); } else { this.gcMultiRow1[e.RowIndex, e.CellIndex].ShowWaveLine = false; } } }
Private Sub gcMultiRow2_CellValidating(ByVal sender As Object, ByVal e As CellValidatingEventArgs) If e.CellName = "Age" Then Dim age As Integer = Integer.Parse(e.FormattedValue.ToString()) If age < 0 OrElse age > 100 Then e.Cancel = True ' Show a wave line to notify user, there are some errors. Me.gcMultiRow1(e.RowIndex, e.CellIndex).ShowWaveLine = True Me.gcMultiRow1.EndEdit() Else Me.gcMultiRow1(e.RowIndex, e.CellIndex).ShowWaveLine = False End If 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