This is a migrated thread and some comments may be shown as answers.

Mouseover in Edit Mode

1 Answer 45 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Eric
Top achievements
Rank 1
Eric asked on 01 Apr 2009, 02:34 PM
    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 "&nbsp" as my Objectivecode and my ObjectiveDescription data.  How can I get the dataitem information after the grid has been changed to edit mode?

1 Answer, 1 is accepted

Sort by
0
Eric
Top achievements
Rank 1
answered on 01 Apr 2009, 07:01 PM
Never mind I figured it out.  just some minor tweeks and everything is good.
Tags
Grid
Asked by
Eric
Top achievements
Rank 1
Answers by
Eric
Top achievements
Rank 1
Share this question
or