Forum
Topic RSS
15:05
26/07/2011
OfflineI have a grid with the following setup. When I edit on the grid, the form doesn't come up with the data populated, but if I type in the data, the edit sends the data to the server correctly and it is updated, but the form is always blank. Also the record paging on the edit form doesn't appear to be working. I have another grid on the same page that works fine and have done this successfully many times before, but can't figure out whats going on.
', '
', 'Question' ], colModel: [ /* Column widths must total... 773 pixels to fill full body area 713 pixels to fill a accordian area 675 pixels to fill a uniform area */ {name:'id',index:'id', width:10, sorttype:'int', hidden:false}, {name:'edit', index:'edit', width:21, align:'center', sortable:false}, {name:'delete', index:'delete', width:21, align:'center', sortable:false}, {name:'question', index:'question', edittype:'text', editoptions: {size:40,maxlength:4000}, width:633, editable: true, sorttype:'string',hidden:false} ], pager: $('#questionpager'), pgbuttons: true, pginput: true, recordtext: '{0} to {1} of {2}', emptyrecords: '', emptyDataText: 'Sorry, there are no records to display.', hidegrid: false, rowNum: 10, rowList: [2,5,10,25,100], pagerpos: 'right', recordpos: 'center', sortorder: 'asc', sortname: 'ID', height: 'auto', sortorder: 'asc', viewrecords: true, caption: 'Questions', gridComplete: function () { } , loadComplete: function () { if ($('#questionlist').getGridParam('records') == 0) { // are there any records? var grid = $('#questionlist'); var emptyText = grid.getGridParam('emptyDataText'); // get the empty text var container = grid.parents('.ui-jqgrid-view'); // find the grid's container container.find('.ui-jqgrid-hdiv, .ui-jqgrid-bdiv').hide(); // hide the column headers and the cells below container.find('.no-records').hide(); container.find('.ui-jqgrid-titlebar').after('
'); // insert the empty data text } else { var grid = $('#questionlist'); var emptyText = grid.getGridParam('emptyDataText'); // get the empty text var container = grid.parents('.ui-jqgrid-view'); // find the grid's container container.find('.ui-jqgrid-hdiv, .ui-jqgrid-bdiv').show(); container.find('.no-records').hide(); } } , jsonReader: { root: 'ROWS', //our data page: 'PAGE', //current page total: 'TOTAL', //total pages records: 'RECORDS', //total record cell: '', id: '0' //will default first column as ID }});
And this for the grid edit call
Thanks for any help
Most Users Ever Online: 994
Currently Online:
16 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