Forum
Topic RSS
04:43
19/12/2008
OfflineHi,
I'm trying to integrate UI datepicker in celledit mode, but Imust admit that its not a success 
In fact, I used the 3.5 example (http://www.trirand.com/jqgrid3.....qgrid.html, row edit mode).
I replaced the onSelectRow event with a beforeEditCell (with the correct parameters).
The pickdates function is correctly called, the input ID is correct, but nothing happens. I suppose that when the event is fired, the input element is not created yet ?
Is there a solution to my problem ?
Thanks
--------
Edit : I saw this post telling that it's the same thing than in row edit mode, but... I tried and the onSelectRow event was never fired (except when multiselect was active and even then, I had to click on the checkbox to fire the event)
03:34
Moderators
30/10/2007
OfflineHello,
Did you read the docs?
Also use dataInit event. See common configuration in editing
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.
04:30
19/12/2008
OfflineYes I read the docs (cell/row editting) + the example, but didn't see the dataInit function.
I just tried, but it seems the function is not called… See my code ('Date' field is the first one)
grid7.jqGrid({
url:'fraisForm.php?action=contentFrais',
datatype: “json”,
colNames:['Date', 'Commentaire', 'Hotel', 'Bar', 'Total'],
colModel:[
{name:'Date',index:'Date', width:70, sortable:false, search: false, editable: true,editrules:{date:true, minValue:0}, datefmt:'d/m/Y', dataInit: function (elem) {$(elem).datepicker({dateFormat:"dd/mm/yy"});}},
{name:'Commentaire',index:'Commentaire', width:200, align:"left", sortable:false, search: false,editable: true,edittype:"textarea", editoptions:{rows:"3",cols:"40"}},
{name:'Hotel',index:'Hotel', align:"center", width:70, editable: true,editrules:{number:true, minValue:0}, sortable:false, search: false},
{name:'Bar',index:'Bar', align:"center", width:70, editable: true,editrules:{number:true, minValue:0},sortable:false, search: false},
{name:'Total',index:'Total', width:60, align:"center", editable: false,sortable:false, search: false}
],
cellEdit: true,
cellurl: “fraisUpdate.php?idSalarie=2&mois=7&annee=2009″,
beforeSaveCell: function(rowid, cellname, value, iRow, iCol) {
…..
},
afterSaveCell: function(rowid, cellname, value, iRow, iCol) {
…..
}
});
05:09
Moderators
30/10/2007
Offline{name:'Date',index:'Date', width:70, sortable:false, search: false, editable: true,editrules:{date:true, minValue:0}, datefmt:'d/m/Y',
editoptions:{dataInit: function (elem) {$(elem).datepicker({dateFormat:"dd/mm/yy"});} } },
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.
05:12
Moderators
30/10/2007
OfflineFor 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.
06:11
When a datepicker is added to a column in a grid the column generates errors:
colModel date field entry:
{label: 'Date Added', name: 'DateAdded', index: 'DateAdded', width: 80,
sortable: false,
search: false,
edittype: 'text',
editable: true,
editrules: { date: true, minValue: 0 }, datefmt: 'dd-mmm-yyyy',
editoptions: { dataInit: function(elem) { $(elem).datepicker({ dateFormat: 'dd-mmm-yyyy' }); } }
},
-When the grid first starts it goes through $.fn.datepicker but doesn't go through _attachDatepicker: (ui.datepicker.js)
-When the dateAdded column is clicked on it goes through $.fn.datepicker and does go through _attachDatepicker: and generates an error.
-The next time it is clicked on it doesn't go throught _attachDatepicker. It tryes to split the value of the DateAdded field but the value is found to be empty even though there is something in it and it generates an error at grid.base.js line 1465.
-grid.common.js.function checkDate line 274 date = date.split(sep);
-Without editoptions: { dataInit: function(elem) { $(elem).datepicker({ dateFormat: 'dd-mmm-yyyy' }); } } in the data field colModel entry there is no error when the column is clicked
-the content of the field is filled via json from server as the grid opens and is "03-sep-2009".
Perhaps someone has encoutered this issue in the past and can indicate what I am doing wrong.
09:26
Moderators
30/10/2007
OfflineHello,
Could you please give a link to the problem or if this is not possible send the configuration to me in order to test.
Thanks
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.
Most Users Ever Online: 994
Currently Online:
313 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
Log In
Home
