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

[Solved] Grid Detail Table

1 Answer 123 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 18 Oct 2009, 11:19 PM
Hello,

I have a RadGrid  (Q1 2008).. it has 1 detail Table...

I am capturing the ItemDatabound event as such:

Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
 
     If e.Item.OwnerTableView.Name = "ClientTable" Then  
          If e.Item.ItemType = GridItemType.Item Then  
(...) 

The event seems to run fine for the first record of the details table, but doesn't fire on any other records in the detail...  the records show fine, but nothing I have set in the event affects them...  ie..

I set the tooltip text for an image button to "Whuzzle"...   tool tip on the first row of the detail table is correct.. but empty on all the remaining rows.

My whole code looks like this..
Protected Sub RadGrid1_ItemDataBound(ByVal sender As Object, ByVal e As _ Telerik.Web.UI.GridItemEventArgs) Handles RadGrid1.ItemDataBound  
     
   If e.Item.OwnerTableView.Name = "ClientTable" Then  
        If e.Item.ItemType = GridItemType.Item Then  
            Dim DGI As GridItem = DirectCast(e.Item, GridItem)  
            Dim rttEdit As Telerik.Web.UI.RadToolTip = _ 
                 DirectCast(DGI.FindControl("rttEdit"), RadToolTip)  
            Dim rttDelete As Telerik.Web.UI.RadToolTip = _ 
                 DirectCast(DGI.FindControl("rttDelete"), RadToolTip)  
 
            rttEdit.Text = "Edit Client" 
            rttDelete.Text = "Delete Client" 
         End If  
      End If  
End Sub  
 
 
Thanks!

Matt

1 Answer, 1 is accepted

Sort by
0
Matt
Top achievements
Rank 1
answered on 19 Oct 2009, 02:40 AM
Never mind!  Figured it out.. I was using GridItem instead of GridDataItem!

Matt
Tags
Grid
Asked by
Matt
Top achievements
Rank 1
Answers by
Matt
Top achievements
Rank 1
Share this question
or