RadGrid for ASP.NET

RadGrid Send comments on this topic.
DetailTableView Property
See Also  Example
Telerik.WebControls Namespace > GridDetailTableDataBindEventArgs Class : DetailTableView Property


Gets a reference to the detail table being bound.   

 

Namespace: Telerik.WebControls
Assembly: RadGrid (in RadGrid.dll)

Syntax

Visual Basic (Declaration) 
Public ReadOnly Property DetailTableView As GridTableView
Visual Basic (Usage)Copy Code
Dim instance As GridDetailTableDataBindEventArgs
Dim value As GridTableView
 
value = instance.DetailTableView
C# 
public GridTableView DetailTableView {get;}

Example

C#Copy Code
protected void RadGrid1_DetailTableDataBind(object source, Telerik.WebControls.GridDetailTableDataBindEventArgs e)
{
   GridDataItem parentItem = e.DetailTableView.ParentItem
as GridDataItem;
   
if (e.DetailTableView.DataSourceID == "AccessDataSource2")
   {
       Session[
"CustomerID"] = parentItem["CustomerID"].Text;
   }
}
    
Visual BasicCopy Code
Protected Sub RadGrid1_DetailTableDataBind(ByVal source As Object, ByVal e As GridDetailTableDataBindEventArgs) Handles RadGrid1.DetailTableDataBind
    Dim parentItem As GridDataItem = CType(e.DetailTableView.ParentItem, GridDataItem)
    If (e.DetailTableView.DataSourceID = "AccessDataSource2") Then
            Session("CustomerID") = parentItem("CustomerID").Text
    End If
End Sub

Requirements

Platforms: Windows 2000, Windows XP Professional, Windows Server 2003 family

See Also