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

Context Menu & Self Referencing Hierarchy

2 Answers 65 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Simon
Top achievements
Rank 2
Simon asked on 20 Nov 2008, 11:38 PM
Hi

I have a RadGrid that is working as expected with a Self Referencing Hierarchy, I have now been tasked with putting a Right Click Context menu in place. What I need to figure out is:

1)     How to select the highlight / select the row that has been right clicked in a nested TableView. 
        
        I have tried to replace:
        
        var index = eventArgs.get_itemIndexHierarchical();
        var mtv= sender.get_masterTableView();
        mtv().selectItem(mtv.get_dataItems()[index].get_element(), true);

        with

        var index = eventArgs.get_itemIndexHierarchical();
        var otv= sender.get_tableView();
        otv().selectItem(otv.get_dataItems()[index].get_element(), true); 

2)    How do I deselect any previously right clicked rows (be they in the Master Table View or in an nested Table View)

        "sender.get_masterTableView().clearSelectedItems();" only clears out selected rows in the Master Table View. 
        Do I need to call get_detailTables() and iterate through these?

 

 


3)     How can I get a value from the either the DataItem or the DataKeyValues from client side for the row that has fired off the 
        context menu?       

Any thoughts / pointers most appreciated

Cheers

Simon
        

2 Answers, 1 is accepted

Sort by
0
Simon
Top achievements
Rank 2
answered on 21 Nov 2008, 01:11 AM
Okay, some progress. I have managed to control the selection and retrieving the Id from the ClientDataKeys for rows in the Master Table View. However it seems that the ClientDataKeys are not copied down to nested Table Views when using Self Referencing Hierarchy. Am I missing a setting, or is this a known limitation of the solution?

Cheers

Simon
0
Sebastian
Telerik team
answered on 24 Nov 2008, 04:17 PM
Hi Simon,

Unfortunately this is indeed an issue in the current version of RadGrid for ASP.NET AJAX - please excuse us for the temporary inconvenience. The good news is that it will be resolved for the next SP of the suite, expected by the end of the day tomorrow (Q3 2008 SP1). I updated your Telerik points for the report.

Please stand by for this release of the bundle, follow the upgrade instructions from here and let us know whether everything is OK.

Kind regards,
Sebastian
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Grid
Asked by
Simon
Top achievements
Rank 2
Answers by
Simon
Top achievements
Rank 2
Sebastian
Telerik team
Share this question
or