lp
  • lp
  • Newbie Topic Starter
2011-08-30T18:36:30Z
I get a "Read Only" message on 'Grid.Cells(x, yy) = Grid.Cells(x, y).Value' below.
????
Please Help

Private Sub Grid_SelectionChanged(sender As Object, e As System.EventArgs) Handles Grid.SelectionChanged
Dim x As Integer, y As Integer, yy As Integer
Dim Amt As Double
For Each myCell As iGCell In Grid.SelectedCells
x = myCell.RowIndex
y = myCell.ColIndex
Next
yy = 0
Select Case y
Case 3 : yy = 5
Case 4 : yy = 6
End Select
If yy > 0 Then
Grid.Cells(x, yy) = Grid.Cells(x, y).Value
End If

End Sub
Igor/10Tec
2011-08-31T06:45:37Z
Grid.Cells returns the iGrid cell object (iGCell), and sure it is read-only as object value. You need to use one of its properties like you do that for the cell value in Grid.Cells(x, y).Value.