protected void GridView1_DataBinding(object sender, EventArgs e)
    {
        GridView gridView = sender as GridView;

        gridView.DataSource = dsDetailView;
        dsDetailView.SelectParameters["EmployeeID"].DefaultValue = ASPxGridView.GetDetailRowValues(gridView, "EmployeeID").ToString();
    }
    protected void ASPxTreeList1_Init(object sender, EventArgs e)
    {
        ASPxTreeList treeList = sender as ASPxTreeList;
        object       keyValue = ASPxGridView.GetDetailRowValues(treeList, "EmployeeID");

        if (keyValue.Equals(2) || keyValue.Equals(5))
        {
            treeList.RootValue = keyValue;
        }
    }
    protected void detailGrid_BeforePerformDataSelect(object sender, EventArgs e)
    {
        ASPxGridView grid = sender as ASPxGridView;

        Session["CustomerID"] = ASPxGridView.GetDetailRowValues(grid, "CustomerID");
    }