Forum


07:43

Moderators
30/10/2007

I think that this is very interesting. Generally there should be no problem The only think that you will to known is that every input id is created as combination of rowid+"_"+name where the rowid is the edited row and name is the name from colModel of that field.
Please let me known of the result. It will be very interesting to demostrate this in the demo page.
Regards
Tony
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.
I`m using on a one row autocompete and ui.datapicker, and there is no
problem.
15:29

11/07/2008

Finally I had a little time to test this.
You're right, it's easy. I put
jQuery('...').editRow(id,true,fieldfunctions);
in onSelecctRow. And in fieldfunctions:
jQuery("#"+id+"_field1","#...").datepicker({dateFormat:"yy-mm-dd"});
jQuery("#"+id+"_field2","#...").autocomplete(...etc etc
This is just great!
12:19

23/07/2008

I'm trying to create an text element and set a datepicker to it when a row is edited.
$("#list").editRow(rowNum);
var calText = document.createElement("text");
$(calText).html("<input id='calText' name='calText' type= 'text' style='width: 95px' value='Click To Set'/>");
$(calText).datepicker();
jQuery("#list").setCell(rowNum, "Promised", calText, { 'text-align': 'center' });
The datepicker isn't being applied to calText.
Any ideas?
01:23

Moderators
30/10/2007

I think that the right syntax is:
$("#calText").datepicker();
Regards
Tony
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.
11:49

Moderators
30/10/2007

Also try first to implement your script without using setCell -i.e.
apply this to other element in the page and see the result - IMHO the way
you do this is not correct.
Regards
Tony
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.
09:21

23/07/2008

I created a text box in the html
<input type="text" id="examplePicker" value="Not set yet" style="width: 90px;" />
I attached the datepicker to it and was able to choose a date from the popup calendar. (not in jqgrid).
I then used setCell and set $('#examplePicker') as the data ie
jQuery("#list").setCell(rowNum, "Promised", $('#examplePicker'), { 'text-align': 'center' });
This moves the element examplePicker from the page into the jqgrid. Good- I click on the text box and the calendar appears. I click a date and the date is saved in the text box. This means there isn't a layer problem.
I cancel/save the row then edit the same row again and now there is no text box to click. I think this happens because the examplePicker is added to the jqgrid. Then it tries to add it again but its gone...
I have also tried to create the element as a div, text, and textarea.
Text and textarea did not work.
Using the div (ie calText = document.createElement("div");) added the calender to be displayed inline. The calendar's months and days can be switched and selected.
10:11

Moderators
30/10/2007

I do not think so. You first applay editRow and then setCell - these method are not compatible.
To attach datepicker in you case
...
jQuery('#rowed6').editRow(id,true,pickdates);
function pickdates(id){ jQuery("#"+id+"_sdate","#rowed6").datepicker({dateFormat:"yy-mm-dd"}); }
Also see examples - datepicker integration in demo page
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:
77 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