Hi, I am really struggling to cope with the object structure in GridView. I have a checkbox column which allows the user to tick to indicate that the row will be deleted when the whole grid is saved. I need this strikeout to occur immediately when the checkbox is ticked and thus have to use the RadGridView1_ValueChanged event. Trouble is that I just don't understand how I can access the font attributes of the cells on the current row and set the strikeout attribute. What is the difference between GridViewCellInfo and GridViewCellElement?
This is my VB code:
Private Sub RadGridView1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles RadGridView1.ValueChanged
If RadGridView1.CurrentColumn.HeaderText = "Del" Then
If CBool(RadGridView1.CurrentCell.Value) = True Then
Dim rowInfo As GridViewRowInfo = RadGridView1.CurrentRow
For Each cellInfo As GridViewCellInfo In rowInfo.Cells
cellInfo.font() 'Doesn't work!
Next
End If
End If
End Sub
All the examples show using a CellElement object returned by an event but the ValueChanged event does not return this kind of object!
I am really struggling with the power of these grids in VB.Net having been used to a simpler life in VB6!
Thanks
This is my VB code:
Private Sub RadGridView1_ValueChanged(ByVal sender As Object, ByVal e As System.EventArgs) _
Handles RadGridView1.ValueChanged
If RadGridView1.CurrentColumn.HeaderText = "Del" Then
If CBool(RadGridView1.CurrentCell.Value) = True Then
Dim rowInfo As GridViewRowInfo = RadGridView1.CurrentRow
For Each cellInfo As GridViewCellInfo In rowInfo.Cells
cellInfo.font() 'Doesn't work!
Next
End If
End If
End Sub
All the examples show using a CellElement object returned by an event but the ValueChanged event does not return this kind of object!
I am really struggling with the power of these grids in VB.Net having been used to a simpler life in VB6!
Thanks