Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Sep 14th, 2012  |  syntax: None  |  size: 0.72 KB  |  views: 139  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. jqGrid('navButtonAdd', topPagerSelector, {
  2.             caption: "<span class='ui-pg-button-text'>Request</span>",
  3.             buttonicon: "ui-icon-person",
  4.             onClickButton: function () {
  5.                                 CompanyName.EditableGrid.grid.jqGrid('saveRow', 'new_row','','clientArray', '', CompanyName.EditableGrid.CustomSave, '', ''); //saving
  6.                                 var rows = CompanyName.EditableGrid.grid.getDataIDs(); // returns [1,2,'new_row']
  7.                         for(i = 0; i < rows.length; i++)
  8.                         {
  9.                                 var rowData = CompanyName.EditableGrid.grid.getRowData(rows[i]);
  10.                                 if(rowData.ResourceId == createdOppResource.ResourceId)
  11.                                 {
  12.                                         CompanyName.EditableGrid.grid.setSelection(rows[i], true);
  13.                                 }
  14.                         }
  15.                                 },
  16.             position: 'last'
  17.         })