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

Enter expands hierarchy instead of opening edit mode

2 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Casper
Top achievements
Rank 1
Casper asked on 10 Apr 2015, 01:15 PM

I have created a radgrid hierarchy in which I have set

TestGrid2.ClientSettings.Selecting.CellSelectionMode = GridCellSelectionMode.SingleCell;

 When I press the enter key the grid expands instead of entering edit mode. I have tried to intercept the expand to manually enter edit mode, but it while I can execute javascript before the expanding I can't seem to stop it.
I have tried the approach from this article and from RvdGrint in this forum post

I hope some one is able to help

 

Regards

Casper

2 Answers, 1 is accepted

Sort by
0
Casper
Top achievements
Rank 1
answered on 10 Apr 2015, 01:46 PM

I've solved the problem with intercepting the expanding. The problem was wrong accessing of the domEvent. end code of the intercept is as follows:

function KeyPress(sender, args) {
    if (args.get_keyCode() == 13) {
        args.cancelBubble = true;
        args.returnValue = false;
    }
    if (args._domEvent.stopPropagation) {
        args._domEvent.stopPropagation();
        args._domEvent.preventDefault();
    }
}

I will update the thread, if I find a solution of how to enter edit mode manually

0
Eyup
Telerik team
answered on 15 Apr 2015, 10:56 AM
Hi Casper,

I'm glad you have managed to find a viable solution for your scenario and thank you for sharing it with our community.
Feel free to turn to us if you need further assistance.

Regards,
Eyup
Telerik
 

See What's Next in App Development. Register for TelerikNEXT.

 
Tags
Grid
Asked by
Casper
Top achievements
Rank 1
Answers by
Casper
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or