Forum

July 10th, 2011
You must be logged in to post Login Register

Search Forums:


 






TableToGrid Toolbar

No Tags
UserPost

21:51
30/04/2012


princedeekay

New Member

posts 2

I'm trying to make the inline editing to work properly, but I'm mainly interested in adding a new row (record) to the grid. What am I doing wrong here?


$(function() {
 tableToGrid("#dataTable", {
  altRows: true,
  height: 'auto',
  hoverrows: true,
  pager: '#pager',
  sortable: true,
  toolbar: [true, "bottom"],
  viewrecords: true,
  width: 1720
 });
/* $("#dataTable").jqGrid('editRow', $rowId, {
  keys: true,
  oneditfunc: function() { alert("Edited!"); }
 });
 $("#dataTable").jqGrid('saveRow', $rowId, {
  succesfunc: function( response ) { return true; }
 });
 $("#dataTable").jqGrid('restoreRow', $rowId, {
  "afterrestorefunc": null
 });
 $("#dataTable").jqGrid('addRow', {
     rowID: "new_row",
     initdata: {},
     position:"first",
     useDefValues: false,
     useFormatter: false,
     addRowParams: {extraparam:{}}
 });
 $("#dataTable").jqGrid('navGrid', #pager, { add: true });
 $("#dataTable").jqGrid('inlineNav', #pager, { add: false });
*/ $("#dataTable").trigger("reloadGrid");
});

No Tags

About the jQuery Grid Plugin – jqGrid forum

Most Users Ever Online:

157


Currently Online:

52 Guests

Forum Stats:

Groups: 1

Forums: 7

Topics: 9588

Posts: 28777

Membership:

There are 10136 Members

There have been 448 Guests

There is 1 Admin

There are 2 Moderators

Top Posters:

OlegK – 1157

markw65 – 179

kobruleht – 144

phicarre – 126

YamilBracho – 124

Renso – 118

Administrators: admin (56 Posts)

Moderators: tony (7007 Posts), Rumen[Trirand] (81 Posts)




Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information