title: How to receive KendoGrid serverPaging request on server side
body: <p>I have a kendoGrid object being initialized where serverPaging is set to <code>true</code>. However, my remote web service which is called through the <code>read</code> property of kendoGrid's <code>datasource</code> property loads an entire tree of JSON every time the server request is made. This service makes a SPARQL request which queries against an ontology-type database. My SPARQL query is hardcoded; hence, in order to receive kendoGrid's page instance, I need to pass the page into my query. The C# function looks like this:</p>
  
  <pre><code>public ResponseData[] RetrieveAllColumns()
      {
          DataManagerClient dmsClient = new DataManagerClient();
          QueryRequestContract qryRequest = new QueryRequestContract
          {
              Graph = "someGraphName",
              WithImports = true,
              DataFormatType = DataFormatTypes.JSON,
              Sparql = @"SELECT DISTINCT ?result ?label ?table ?state ?schema ?database ?server
                          WHERE { ?result a database_onto:Column . 
                                  ?result rdfs:label ?label . 
                                  ?tableVar database_onto:tableHasColumn ?result .
                                  ?tableVar rdfs:label ?table . 
                                  ?result database_onto:columnHasState ?stateVar .
                                  ?stateVar rdfs:label ?state .
                                  ?schemaVar database_onto:schemaHasTable ?tableVar .
                                  ?schemaVar rdfs:label ?schema .
                                  ?databaseVar database_onto:databaseHasSchema ?schemaVar .
                                  ?databaseVar rdfs:label ?database .
                                  ?serverVar database_onto:serverHasDatabase ?databaseVar .
                                  ?serverVar rdfs:label ?server .
                              } ORDER BY (LCASE(?label))" // serverPaging would be added here as OFFSET and LIMIT for the query
          };
  
          QueryResponseContract qryResponse = dmsClient.Query(qryRequest);
          RDFServiceResponse jsonData = JsonConvert.DeserializeObject&lt;RDFServiceResponse&gt;(qryResponse.ReturnData);
          List&lt;ResponseData&gt; lstRspData = new List&lt;ResponseData&gt;();
  
          foreach (BindingsObj bndData in jsonData.results.bindings)
          {
              lstRspData.Add(new ResponseData
              {
                  Name = Regex.Replace(bndData.label.value, @"\(.*?\)", ""),
                  Link = bndData.result.value,
                  Table = bndData.table != null ? Regex.Replace(bndData.table.value, @"\(.*?\)", "") : null,
                  State = bndData.state != null ? bndData.state.value : null,
                  Database = bndData.database != null ? Regex.Replace(bndData.database.value, @"\(.*?\)", "") : null,
                  Schemas = bndData.schema != null ? Regex.Replace(bndData.schema.value, @"\(.*?\)", "") : null,
                  Server = bndData.server != null ? Regex.Replace(bndData.server.value, @"\(.*?\)", "") : null
              });
          }
  
          return lstRspData.ToArray();
      }
  </code></pre>
  
  <p>;where <code>ResponseData[]</code> is the array model and <code>RDFServiceResponse</code> is the RDF array model.</p>
  
  <p>This is my controller:</p>
  
  <pre><code>public CountResponse Get()
  {
      return this.cmlData.RetrieveColumnTotal();
  }
  </code></pre>
  
  <p>To reiterate my question, how can I pass KendoGrid's Datasource paging properties (page instance and page size specifically) to my service so that I can make the necessary adjustments to my server-side query?</p>