|
[app.component.ts]
export class AppComponent {
public gridData = ej.DataManager({
url: "http://localhost:49339/api/Values",
adaptor: new ej.WebApiAdaptor(),
crossDomain: true
});
[ValuesController.cs]
public object Get()
{
var queryString = HttpContext.Current.Request.QueryString;
int skip = Convert.ToInt32(queryString["$skip"]);
int take = Convert.ToInt32(queryString["$top"]);
if (order.Count() == 0)
BindDataSource();
var data = order;
return new { Items = data.Skip(skip).Take(take), Count = data.Count() }; //pefrom skip and take at server side.
} |
Hi Mani,
The reason I want to hide the indent is because I though it doesn't look great and it would look better without it. The reason I have a grouping is just to separate similar rows with something that is visible to the user.
For the second query, I got it working fine, thanks. However, is it possible to make some operations local while the rest are in server? For example I want to perform paging and filtering in server, while I want sorting and searching to be done in local.