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

Dialog within custom editor

6 Answers 217 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Roland
Top achievements
Rank 1
Roland asked on 27 Sep 2012, 02:16 PM
Hi

I have a Grid with a custom editor. The custom editor has the possibility to open a dialog where the user can search for the value. If I open the dialog the grid close the editing mode

See a simplified solution which reproduce the problem on jsfiddle
When you click on the search button, the dialog opens and the grid cancel the editing mode

Thanks for your help

6 Answers, 1 is accepted

Sort by
0
Nohinn
Top achievements
Rank 1
answered on 27 Sep 2012, 02:25 PM
It is somehow related to the code used by the dialog control of jQueryUI, if you use the window control of kendoUI there's no problem:
http://jsfiddle.net/sTa5z/36/ 

P.S: The problem is now when you focus the search input
I don't know exactly what are you trying to do, but if you just one to let the user search for something that will be later the value of the field, couldn't you use the autocomplete control for it?
0
Roland
Top achievements
Rank 1
answered on 27 Sep 2012, 02:41 PM
Thanks for your fast feedback!

Yeah exactly now i have the problem when I focus the textbox. Inside the dialog there is a searchbox and another kendo grid with the possible values. The user can select one of these values and that specific value should be replaced in the grid. This means autocomplete isn't enough it's more like a lookup dialog
0
Roland
Top achievements
Rank 1
answered on 01 Oct 2012, 11:30 AM
Maybe I have to try something different. If I use the editmode inline the row will be stay in the edit mode during the lookup with the dialog popup
JsFiddle

How can I force to start the inline edit mode on a specific cell? So the user can click on a cell and it will start the inline edit mode, but the focus should be on the current cell. I tried to run the editrow method on the click event, but this has the same behavior as my initial problem. I think the editrow only set the complete row to incell edit mode not inline
JsFiddle
0
Nohinn
Top achievements
Rank 1
answered on 01 Oct 2012, 11:42 AM
Take a look at the edit and databound callbacks:
http://jsfiddle.net/sTa5z/45/ 
0
Roland
Top achievements
Rank 1
answered on 01 Oct 2012, 12:23 PM
Thanks, but your changes will start the incell edit mode, but I need a possibility to start the inline edit mode. with the inline edit mode the textbox is still visible if i open the dialog window. 

See my Fiddle
http://jsfiddle.net/Teac/sTa5z/43/

How can I force to start the inline edit mode?
0
Roland
Top achievements
Rank 1
answered on 01 Oct 2012, 02:20 PM
ok i found a solution, see my jsfiddle

I just add a click event to every cell inside my grid and start the inline editing mode for the current cell like the following
$('#grid table tr td').live('click', function () {
  if(!$(this).parent().attr('data-role')) {
    $("#grid").data("kendoGrid").saveRow();
    $("#grid").data("kendoGrid").editRow($(this).parent());
    $(this).find(":input").focus();
  }
});
Tags
Grid
Asked by
Roland
Top achievements
Rank 1
Answers by
Nohinn
Top achievements
Rank 1
Roland
Top achievements
Rank 1
Share this question
or