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

[Solved] Sync selected item with highlighted

6 Answers 113 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Markus
Top achievements
Rank 1
Markus asked on 07 Feb 2008, 02:46 PM

In ASP.Net radgrid following was possible: http://www.telerik.com/help/radgrid/v4_Net1/grdSynchronizeNavigationSelection.html. When I use prometheus grid I receive error message "Object doesn't support property or method in the line "objGrid.SetActiveRow(row.Control)". Can you tell if this is possible with prometheus controls too?

6 Answers, 1 is accepted

Sort by
0
Ves
Telerik team
answered on 11 Feb 2008, 07:02 AM
Hi Markus,

You can use setActiveRow method in RadGrid "Prometheus". It is shown here.

Sincerely yours,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 11 Feb 2008, 09:46 AM
I tried it but don't get it work. I receive the error message "Object doesn't support property or method". I verified with "alert(grid.get_id())" that returned reference by "$find" is the correct control. How could that be?
0
Ves
Telerik team
answered on 13 Feb 2008, 05:11 PM
Hello Markus,

It seems the help topic I pointed is not entirely correct. You can use the following code to set an item active when it is selected in RadGrid "Prometheus":

        function RowSelected(sender, args) 
        { 
            var grid = $find(sender.get_id()); 
            grid.set_activeRow($get(args.get_id())); 
        } 
 

Hope this helps.

Best wishes,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 14 Feb 2008, 02:03 PM
Thanks for help, the error message no more appears, but syncronization with keyboeard navigation is still not working. I think there is code required for "OnActiveRowchanged", but I was no able to find out the needed code. Hope you can help me again.
0
Ves
Telerik team
answered on 18 Feb 2008, 02:37 PM
Hello Markus,

Here is the code that worked fine for me:

<script type="text/javascript"
        function RowSelected(sender, args) 
        {    
            var grid = $find(sender.get_id());  
            { 
                grid.set_activeRow($get(args.get_id())); 
            } 
        } 
        function ActiveRowChanged(sender, args) 
        { 
            if (sender.get_masterTableView().get_selectedItems()[0].get_id() != args.get_id()) 
            { 
                args.get_tableView().selectItem($get(args.get_id()));          
            } 
        } 
    </script> 


All the best,
Ves
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Markus
Top achievements
Rank 1
answered on 18 Feb 2008, 03:18 PM
Thanks for help, now I get it work.

I'm sorry but with help of documentation I was not able to find those few lines of code.
Tags
Grid
Asked by
Markus
Top achievements
Rank 1
Answers by
Ves
Telerik team
Markus
Top achievements
Rank 1
Share this question
or