0
votes

Is there a way to force the Telerik MVC grid to use GridOperationMode "client" even if the grid contains zero rows? I have observed that the grid respects the operation mode if there are one or more rows present, but it seems to fall back to server mode if the result set is empty. Clicking the column hearders casues a post request to the server... It seem to do a single post when rendering the empty grid initially as well. I debugged the Telerik JavaScript, and it is in fact sending an Ajax post request when rendering an empty grid. Is there a way to disable this request?

Is there an explenation for this behavior?

1

1 Answers

0
votes

The grid makes an Ajax request by default when empty. It tries to load the data from the action method it is configured to. To prevent that use the OnDataBinding event:

  function onDataBinding(e) {
      e.preventDefault();
  }