Cell Editor Location

Is there any way to force where the grid cell editor appears?

I have a grid where the last column is of type ‘txt’ (the right most column on the picture with no header text).

I would like that cell editor to appear “inside” the area of the grid as opposed to breaking out of it, which is the case on the picture.

How can I force this behavior?

You may try to use the editCell() method:
docs.dhtmlx.com/api__dhtmlxgrid_editcell.html
It opens the editor of the current selected cell.

Could you be a little more specific?

I know the method editCell, but as far as I’m aware, it doesn’t handle anything about the positioning of the editor that is opened.

Unfortunately the issue cannot be reproduced locally.
Could you please, share the demo link or a complete demo, where the problem can be reproduced locally.
You may try to change the css styles of the “txt” editor with the following rule:

<style> dhx_textarea{ } </style>

Here is a demo with some sample data.

Simply run the html file in a browser and once data is loaded into the grid, try to edit a cell in the Comment column.

This should produce the error.

Firefox and Chrome both show only part of the editor as the rest is breaking out of the grid area (in this case out of the browser viewport) while IE widens the page on the right side while pushing the grid to the left to show the full editor.

Neither of these behaviors are desirable.
2015-06-12_1.zip (245 KB)

Are you able to see what I mean by running my sample?

Any news on this matter or are you having problems using my sample?

I apologize for the delay with your issue.
Unfortunately the focus to the opened editor is the feature os the IE browser. It is not available to implement such behavior in the other browsers.

If such focus is critical for you the custom fix may be created for your situation, where the dhtmlxgrid is fullscreen, so that the “txt” editor will shift left to place the visible area of the page.

I have now fixed this issue myself by creating a custom editor in a new window that opens when the cell is double-clicked.
It kinda ruins the keyboard navigation but at least I now have full control of how it looks and what it does.

Of cause I could probably re-enable keyboard navigation by handling the onEditCell event at stage 1.
But it seems that the double-click solution is more desirable after all, because the user can tab past this column without ever opening the editor, which makes good sense if not all rows needs a value in the cell.