or
| If TypeOf e.CellElement.ColumnInfo Is GridViewDataColumn AndAlso DirectCast(e.CellElement.ColumnInfo, GridViewDataColumn).DataField = "HasComments" Then | |
| If Not (TypeOf e.CellElement.RowElement Is GridHeaderRowElement) Then | |
| 'exclude Header element in the data column | |
| If e.CellElement.Children.Count > 0 Then | |
| If e.CellElement.Children(0).GetType() Is GetType(Telerik.WinControls.UI.RadCheckBoxEditor) Then | |
| ' remove the checkbox | |
| e.CellElement.Children.RemoveAt(0) | |
| Dim pieceid As Integer = CType(e.CellElement.RowElement.RowInfo.Cells("PieceId").Value, Integer) | |
| Dim hasComments As Boolean = ' load has comments | |
| Dim img As RadImageItem = New RadImageItem() | |
| If hasComments Then | |
| img.Image = My.Resources.Resources.green | |
| Else | |
| img.Image = My.Resources.Resources.red | |
| End If | |
| e.CellElement.Children.Add(img) | |
| e.CellElement.Children(0).Alignment = ContentAlignment.MiddleCenter | |
| e.CellElement.Alignment = ContentAlignment.MiddleCenter | |
| End If | |
| End If | |
| End If | |
| End If |
Hi
I am using Telerik.WinControls.UI.RadGridView