I don't seem to be able to hide the Delete command based on certain condition? These are my code:
<telerik:GridBoundColumn DataField="Invitation_Date" DataType="System.DateTime"
HeaderText="Invitation Date" DataFormatString="{0:dd/MM/yyy}" SortExpression="Invitation_Date"
UniqueName="Invitation_Date">
</telerik:GridBoundColumn>
<telerik:GridButtonColumn ButtonType="LinkButton" CommandName="Delete" ConfirmText="Are You Sure?"
HeaderText="Delete" Text="Delete" UniqueName="DeleteColumn">
</telerik:GridButtonColumn>
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound
If TypeOf e.Item Is GridDataItem Then
Dim item As GridDataItem = DirectCast(e.Item, GridDataItem)
If item("Invitation_Date").Text Is Nothing Then
Dim btn As LinkButton = DirectCast(item("DeleteColumn").Controls(0), LinkButton)
btn.Visible = False
End If
End If
End Sub