title: jqgrid + refresh grid with new data
body: <p>I have a web app with a jqgrid which is populated with data using jquery ajax, which calls a webmethod. The jqgrid is refreshed every 5 seconds to poll data. what i would like to do is get new data that is added to the table every 5 seconds. </p>
  
  <p>So i thought i would modify my webmethod to get data in batches of 20, starting from the last ID read. What i thought is in the webmethod i would do a counter, firstRecordID, lastRecordIDRead variables, if counter = 0 i would get the first record ID and store it in firstRecordID, if counter is larger than 0 than firstRecordID would be the lastRecordIDRead (firstRecordID + 20). So if the first ID in database is 906, on the first poll it would get records from 906 to 925, then in second poll it will get from 926 + 20 other records and continue like this. </p>
  
  <p>When this method is used in a console app as an example it worked fine, however i cant understand how should i go to implement this when using a webservice, since a webservice is stateless i dont know how i should implement the counter variable etc. Any idea please? Or maybe a solution which is better?</p>
  
  <p>Thanks a lot.</p>