Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Go to different page, when option scroll is true
04/07/2013
14:25
Avatar
dembskoi
New Member
Members
Forum Posts: 1
Member Since:
03/07/2013
sp_UserOfflineSmall Offline

Hi guys!

Thank you for your plugin, it is awesome!

I've used the following configuration:

    $.ajax({
      type: "POST",
      url: "table_columns",
      dataType: "json",
      data: { button: $('#button_val').val() },
      success: function(result) {
        var colN = result.colNames;
        var colM = result.colModel;
        $("#data_table").jqGrid({
          url: 'data_table',
          datatype: "json",
          mtype: 'GET',
          postData: { button: function() { return $('#button_val').val(); }  },
          scroll: 1,
          hidegrid: false,
          colNames: colN,
          colModel: colM,
          pager: '#data_table_navi',
          sortname: 'id',
          rowNum: 100,
          rowList: [100, 200, 300],
          viewrecords: true,
          sortorder: "desc",
          sortable: true,
          height: $('.inner-middle-center').height() – 75,
          rownumbers: true,
          autowidth: true,
          shrinkToFit: true,
          caption:"Any table name",
          loadError: function(xhr,status,error){ alert(status); }
        })
      },
      error: function(x, e) {
        alert(x.readyState + " "+ x.status +" "+ e.msg);
      }
    });

    setTimeout(function () { $("#data_table").jqGrid('setGridParam',{ datatype: 'json' }); }, 50);

scroll option sets to 1, but I need get an additional mechanizm to switch between pages.

I've tried to realize the following feature:

<button onClick="grid = $('#data_table'); grid.setGridParam({ page: $('#temp').val() }); grid.trigger('reloadGrid'); ">Test Button</button>
<input id='temp'></input>

But it works correctly only first once.

I'll be glad of any help, thanks.

Regards

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
43 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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information