Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This is what I found with a little help from Telerik Support. </p> <p>In the ClientSetting of the RadGrid add a method to the ClientEvents OnDataBinding. My name method name is OnClientDataBinding in this example</p> <p> </p> <p>Then create the client method:</p> <pre><code> // This OnClient DataBinding builds the arguments uses to call the // Ajax Service used to retrieve that when needed. function OnClientDataBinding(sender, args) { // get data source location, method name and arguments var dataSourceLocation = args.get_location(); var selectMethodName = args.get_methodName(); var methodArguments = args.get_methodArguments(); ... </code></pre> <p>I actually modified the sortExpression and fitlerExpresion and these are passed as an Array.</p> <pre><code> // construct arguments for Ajax Service var myMethodArguments = new Object(); myMethodArguments.startRowIndex = methodArguments.startRowIndex; myMethodArguments.maximumRows = methodArguments.maximumRows; myMethodArguments.sortExpression = sortExpression; myMethodArguments.filterExpression = filterExpression; myMethodArguments.myParam1 = "David"; myMethodArguments.myParam2 = 14926; args.set_methodArguments(myMethodArguments); } </code></pre> <p>Then create your Service Controller Method something like:</p> <pre><code>public JsonResult GetCustomerSearchResults(int startRowIndex, int maximumRows, string sortExpression, FilterExpression[] filterExpression, string myParam1, int myParam2) { IEnumerable results; ... fill your Data and Count. return Json(new { Data = results.ToList(), Count = totalNumberOfRows }); } </code></pre> <p>FilterExpression[] is an object that I created for my use. This is not a Telerik object.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload