Forum
10:45
02/10/2014
Hello,
I am currently working on web-based app for a customer, basically what it should do is just output a grid with informations from a databse, and give the user the possibillity to a few information.
This is all working quite ok, I just have one trouble getting the focus to the first editable cell in a selected row - BUT only on the Ipad/Iphone.
The focus works ok on a PC, on the Ipad the editmode starts correctly, and works fine, but isnt focusing anything - which means the customer needs to click on a row to start editing, then click into the textbox to actually open the virtual keyboard.
I have read up on the behaviour of the Ipad and it seems to be a common problem - solved by setting the focus by changing the touchend/mouseup event, but in context of jqGrid I just dont know how to do it.
Did anybody here had the problem before and might know how to fix it?
thanks in advance!
13:32
Moderators
30/10/2007
Hello,
Â
Depending on the editing module you may use a events which fire after the editing is build.
Â
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
12:17
02/10/2014
Hi,
Â
This is for example the way I tried to do it: (you can see I tried it via different ways)
onSelectRow: function(id){          if(id!=lastsel){             jQuery('#list').jqGrid('saveRow',lastsel);             //Adding Value for Submission Counter             makeAmountOutput();                         //Set Null, select new Row             lastsel = null;             jQuery('#list').jqGrid('editRow',id,true);             lastsel=id;             var focusElement = id+'_NR';             //alert(focusElement);             $(focusElement).focus();             //$(document).bind("mouseup",function(event) {             //   jQuery('#list').jqGrid('getCell',id,'NR').focus(); //selects specific row and underlying cell and sets the focus             //});          }
As I said in another Thread of mine (and most likely is shown by my lack of talent to format anything correctly ^^'')
I am rather new to Jscript / HTML, but I start to get the hang of it.
Anyway I really appreciate the help - even though I have vanished for the past month...
13:27
Moderators
30/10/2007
Hello,
Â
In the last release we have a parameter named focusField which should be a number represented the number of colModel start from 0. If set the desired field should be focused
jQuery('#list').jqGrid('editRow',id, { keys: true, focusField : 3} );
Â
Another possible solution is to try to use oneditfunc which I recommend you in my previous post
jQuery('#list').jqGrid('editRow',id, {  keys: true,  oneditfunc : function( rowid) {    $("#"+rowid+"_NR").focus();  } });
Â
Kind Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
12:19
02/10/2014
So,
Apperantly since IOs 7.0 Apple made it "near" impossible to set focus programmatically - you can only set Focus on a select few user initiated events, such as touchend/clickend events.
Even if it is kind of a bummer - I guess it can't be helped, thank you anyway for your help and replies.
Â
I have one other question regarding teh manipulation of attributes of the textboxes generated by the edit mode. But I am not sure if I should open a new Thread or just keep it in this one? (not so sure about the forum policies here...)
15:38
Moderators
30/10/2007
Hello,
Yes We can not do anything in this case.
About the question - new question - new thread.Â
Â
Kind Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
67 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66