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

Problems Running Vlad's Detail Client Binding examples

1 Answer 79 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Matthew
Top achievements
Rank 2
Matthew asked on 13 Jun 2009, 05:44 PM
Hey Folks. I've setup the Client-side master/detail binding as per Vlad's examples and am having some problems with this particular function:


function RadGrid1_HierarchyExpanding(sender, args) {
    collapseItems(sender);

    try {

        var customerID = args.getDataKeyValue("CustomerID");
        var nestedViewItem = args.get_nestedViewItem();

        nestedViewItem.cells[1].appendChild($get("RadGrid2"));

        ordersView = $find("RadGrid2").get_masterTableView();

        ordersCommandName = "Load";

        WebService.GetOrdersByCustomerID(customerID, ordersView.get_currentPageIndex() * ordersView.get_pageSize(), ordersView.get_pageSize(),
                    ordersView.get_sortExpressions().toString(), ordersView.get_filterExpressions().toDynamicLinq(),
                        updateOrdersGrid);
    }
    catch (Error) {
        alert(Error);
    }
}

Both IE and Firefox complain that cells is undefined. Firefox can see it, so I think the cells is private to the row. How else can I replace the nestedViewItem.cells[] content? I think everything else is working OK.



1 Answer, 1 is accepted

Sort by
0
Sebastian
Telerik team
answered on 17 Jun 2009, 02:50 PM
Hello Matthew,

I tested the sample using the latest version 2009.1.527 of RadControls for ASP.NET AJAX and dynamically injecting the second grid inside the nested view template with the appendChild javascript method and it worked without issues on my end.

For your further convenience I am attaching the updated version of the project to this forum thread. Note that you will need to collapse the rest of the grid items on expand operation with custom logic to avoid unexpected side effects (I suppose you do that with the collapseItems method you invoke inside the OnHierarchyExpanding client handler of the grid).

Best regards,
Sebastian
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Matthew
Top achievements
Rank 2
Answers by
Sebastian
Telerik team
Share this question
or