I have some items in a database that are system items and I don't want users to be able to change them. Is there a way I can hide the GridEditCommandColumn and GridButtonColumn (delete) for specific rows only? e.g. I have 4 rows with a DayKeyName, ID, it's an identity field and I want to hide 1 and 2 but not 3 and 4.
I tried this but I think I'm missing something:
Thanks for you help!!
I tried this but I think I'm missing something:
Protected Sub RadGrid_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid.ItemDataBound Dim Datakey As Integer = Nothing If TypeOf e.Item Is GridDataItem Then Dim item As GridDataItem = DirectCast(e.Item, GridDataItem) Datakey = item.OwnerTableView.DataKeyValues(e.Item.ItemIndex)("ID") End If Dim tableView As GridTableView = DirectCast(e.Item.OwnerTableView, GridTableView) Dim editColumndetail As GridEditCommandColumn = DirectCast(tableView.GetColumn("EditColumn"), GridEditCommandColumn) If Datakey = 1 Or Datakey = 2 Then editColumndetail.Visible = False Else editColumndetail.Visible = True End If End SubThanks for you help!!