I am new to this Grid control. It seems I can highlight a row and hit delete. Then the row header text I just customized will be deleted. How can I prevent this from happenning? User should be able to delete the cell text but not the header text.
After setting the Header text, also set the cell to be ReadOnly.
Me.GridControl1(2, 0).Text = "sample"
Me.GridControl1(2, 0).ReadOnly = True
JNJoy NiJune 6, 2003 05:14 PM UTC
I tried this. It still allowed deletion of the header text.
> After setting the Header text, also set the cell to be ReadOnly.
> Me.GridControl1(2, 0).Text = "sample"
> Me.GridControl1(2, 0).ReadOnly = True
AdministratorJune 6, 2003 08:24 PM UTC
Setting ReadOnly works in the 1.6 RC1 release which you can download from this link.
Read the release notes:
Download the installation (~59meg):
In 184.108.40.206, if you want to prevent this you can catch the ClearingCells event, and only clear the non-header cells.
Private Sub GridControl1_ClearingCells(ByVal sender As Object, ByVal e As Syncfusion.Windows.Forms.Grid.GridClearingCellsEventArgs) Handles GridControl1.ClearingCells
If e.RangeList.AnyRangeIntersects(GridRangeInfo.Col(0)) Then
Dim range, range1 As GridRangeInfo
For Each range In e.RangeList
range1 = range.ExpandRange(1, 1, GridControl1.RowCount, GridControl1.ColCount)
e.Handled = True