Using ServerProxy ExtraParams

  1. #1

    Using ServerProxy ExtraParams

    Hi Daniil

    I look your that post

    - How to pass start and limit parameter to "GetData" method below like ?

    public ActionResult GetData(int start,int limit)
    {
        return this.Store(this.CreateTestData());
    }
    - Which I should use method ?

    thanks...
  2. #2
    I have solved problem.
    I'm used Proxy instead of a ServerProxy ExtraParams

    Html.X().Store()
    .ID("store1")
    .Proxy
    (
        Html.X().AjaxProxy()
        .Url(Url.Action("GetData"))
        .StartParam("start")
        .LimitParam("limit")
        .PageParam("page")
        .ExtraParams
        (
            ep =>
            {
              ep.Add(new Parameter("p1", "1", ParameterMode.Value));
              ep.Add(new Parameter("p2", "2", ParameterMode.Value));
            }
        )
        .Reader
          (
           Html.X().JsonReader()
           .RootProperty("data")
           .TotalProperty("total")
          )
    )
    Controller
    public ActionResult GetData(int start, int limit, int page, string p1, int p2)
    {
       // to do 
    }
    Last edited by ismailkocacan; Aug 27, 2015 at 1:53 PM.

Similar Threads

  1. Groupcommand ExtraParams
    By pmaidlow in forum 2.x Help
    Replies: 12
    Last Post: Sep 11, 2015, 1:33 PM
  2. Problem with ExtraParams
    By amathos in forum 2.x Help
    Replies: 2
    Last Post: Jan 28, 2013, 4:55 PM
  3. Replies: 6
    Last Post: Aug 01, 2011, 4:53 PM
  4. AjaxFormResult && ExtraParams
    By threewonders in forum 1.x Help
    Replies: 1
    Last Post: Jun 28, 2011, 7:30 AM
  5. How to use ExtraParams ?
    By iscript in forum 1.x Help
    Replies: 1
    Last Post: Aug 21, 2009, 7:09 AM

Posting Permissions