0

While using inline editing , Is there a way to set focus on the first cell inside a row, without using the cell id? Can the focus be set by the cell index number (position inside the row)?

Thank's In Advance.

user590586
  • 2,960
  • 16
  • 63
  • 96
  • In which event handler you want to do this? Which information you have which you can use as the input? – Oleg May 18 '11 at 15:52
  • @Oleg: I have only the grid and the row id. I want to focus the first cell inside that row. I don't have it's specific id. I have a general function to all of my grids, and when adding a new row I want the focus to be set on the first cell. the problem is that each gruid have diffrent cells - and I want it to be general to all grids. thank's. – user590586 May 18 '11 at 16:16
  • You deleted your [another question](http://stackoverflow.com/questions/5169317/jqgrid-input-type-button-inside-cell-show-only-on-edit-mode) where you asked me what I mean under `formatter:'action'`. Look at [the answer](http://stackoverflow.com/questions/5196387/jqgrid-editactioniconscolumn-events/5204793#5204793) and [this one](http://stackoverflow.com/questions/6074604/jqgrid-beforeselectrow-and-sortablerows-exclude-column-from-being-draggabl/6076774#6076774). – Oleg May 21 '11 at 18:44
  • @Oleg: thank's. I deleted It because I understood the unformat function and was able to create what I wanted, so the question was irrelevant. – user590586 May 22 '11 at 08:15
  • OK! I find the best if you solved the problem yourself. In the case you can better keep it in mind. Congratulation! – Oleg May 22 '11 at 08:19

1 Answers1

4

If I understand you correct you need just use editCell method of the cell editing. For example

$("#list").jqGrid('editCell',1,3,true);

See the demo.

Oleg
  • 220,925
  • 34
  • 403
  • 798