Protected Sub rgContract_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgContract.ItemDataBound |
If TypeOf e.Item Is GridDataItem Then |
Dim dataItem As GridDataItem = CType(e.Item, GridDataItem) |
dataItem("ObjectiveCode").ToolTip = dataItem("ObjectiveDescription").Text |
End If |
End Sub |
Protected Sub rgContract_ItemCreated(ByVal sender As Object, ByVal e As GridItemEventArgs) Handles rgContract.ItemCreated |
If TypeOf e.Item Is GridEditableItem AndAlso e.Item.IsInEditMode Then |
Dim item As GridEditableItem = TryCast(e.Item, GridEditableItem) |
For Each column As GridColumn In e.Item.OwnerTableView.RenderColumns |
If Not (TypeOf column Is GridEditableColumn) Then |
Continue For |
End If |
If TypeOf item(column.UniqueName).Controls(0) Is TextBox OrElse TypeOf item(column.UniqueName).Controls(0) Is RadComboBox Then |
TryCast(item(column.UniqueName).Controls(0), WebControl).Width = Unit.Percentage(80) |
End If |
Next |
End If |
End Sub |
Protected Sub rgContract_PreRender(ByVal sender As Object, ByVal e As System.EventArgs) Handles rgContract.PreRender |
For Each item As GridItem In rgContract.Items |
item.Edit = True |
Next |
rgContract.Rebind() |
End Sub |
I currently have this code in place
The tool tip works if I do not run the pre render to change the grid to edit mode, but once I run the prerender
it doesn't have the dataitem information anymore resulting in " " as my Objectivecode and my ObjectiveDescription data. How can I get the dataitem information after the grid has been changed to edit mode?