I've added tooltips to my grid using this code
If I uncomment the 3 lines in the for each loop I get this error
Object reference not set to an instance of an object
when I click on any rows edit button, it works fine if I live the lines commented out.
| Protected Sub RadGrid1_ItemCreated(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemCreated |
| If (TypeOf e.Item Is GridDataItem) Then |
| Dim gridItem As GridDataItem = CType(e.Item, GridDataItem) |
| Dim ent As OrderTrackingViewEntity = CType(e.Item.DataItem, OrderTrackingViewEntity) |
| If Not String.IsNullOrEmpty(ent.WarehouseComments) Then |
| For Each column As GridColumn In RadGrid1.MasterTableView.RenderColumns |
| ' If (TypeOf column Is GridBoundColumn) Then |
| ' gridItem(column.UniqueName).ToolTip = ent.WarehouseComments '(gridItem.OwnerTableView.DataKeyValues(gridItem.ItemIndex)("WarehouseComments").ToString) |
| ' End If |
| Next |
| End If |
| End If |
| End Sub |
If I uncomment the 3 lines in the for each loop I get this error
Object reference not set to an instance of an object
when I click on any rows edit button, it works fine if I live the lines commented out.