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

[Solved] Double click to edit in place

1 Answer 25 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Brendan
Top achievements
Rank 1
Brendan asked on 30 Mar 2011, 12:41 AM
I'm trying to add the ability to double-click on a cell and have that let me edit the cell in place (instead of having external buttons).

I followed the instructions in this post http://www.telerik.com/community/forums/aspnet-mvc/grid/edit-on-double-click.aspx, but when I double-click on a cell I get the following error in javascript:

grid.editRow is not a function

I'm using 2011.1.315 of the Telerik controls (razor).

I'm still learning my way around razor, so there may be something simple I need to do...

Thanks,
Brendan Segraves

1 Answer, 1 is accepted

Sort by
0
Brendan
Top achievements
Rank 1
answered on 30 Mar 2011, 04:41 PM
Ok, I got it to work, but I had to add a:

    columns.Command(commands => commands.Edit());

Without that one line, I would get the "editRow is not a function" error. To hide the command buttons, I then added a "display:none" to the last column via css, as in:

.myContainer .t-last
{
    display: none;
}

And now I have "double click to edit" functionality without the buttons. I assume there's an easier way to do this, but at least this approach works.


Tags
Grid
Asked by
Brendan
Top achievements
Rank 1
Answers by
Brendan
Top achievements
Rank 1
Share this question
or