How to retrive filtered Data From DB Server with refresh button

2 posts, 0 answers
  1. Flavio
    Flavio avatar
    1 posts
    Member since:
    Nov 2015

    Posted 26 Nov 2015 Link to this post

    I evaluating your component.

    I need to retrive filtered data with custom filter into custom header with refresh button click


    .Pageable(p => p.Refresh(true))



    .Scrollable(scrollable => scrollable.Height(30))


    .HtmlAttributes(new { style = "height:550px;" })

    .DataSource(dataSource => dataSource



    .Model(model => model.Id(p => p.Id))


    .Read(create => create.Action("IncomingRead", "Grid", new { topRow = ""}))



    public ActionResult IncomingRead([DataSourceRequest]DataSourceRequest request)





    string virtualPath = "";

    var customerWhereCondition = "";

    var userIdWhereCondition = "";

    var versionNumberWhereCondition = "";

    var json = Helper.GetDataFromDb(virtualPath, 100, "-1", customerWhereCondition,

    userIdWhereCondition, versionNumberWhereCondition, new DateTime(2015, 4, 1), DateTime.Now);

    return Json(json.ToDataSourceResult(request));






    how to set filter into request object(client) and get filter into the server for execute new query?


    thankyou in advance.



  2. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 30 Nov 2015 Link to this post

    Hello Flavio,

    You should use the DataSource API to get the filter expression on the server, like this:

    and after having the expression you can transform it to a custom Where condition per your needs.

    Maria Ilieva
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top