We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on : Nov 16th 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

args.model.data.addParams not work with WebMethodAdaptor

Thread ID:

Created:

Updated:

Platform:

Replies:

119886 Aug 10,2015 06:19 PM UTC Aug 11,2015 09:28 AM UTC ASP.NET Web Forms 3
loading
Tags: Grid
Adisorn Sirisomboon
Asked On August 10, 2015 06:19 PM UTC

Hello,

I'm using WebMethodAdaptor to get Remote Data to grid. it's work.

except the function addParams is not work (it work finr at first when i use UrlAdaptor )

I can't use UrlAdaptor because of the problems with filter.


Here my code

//in Backend DataExplorer.aspx
[WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)] 
        public static object GetData(Syncfusion.JavaScript.DataManager value, int? employeeID)
        {
            return BindDataSource(value, employeeID); //just data access function
        }

//in UI
             
           
            
           
               .....
               .....


                 
What wrong with it? Please help.

Thanks in advance.

Adisorn Sirisomboon
Replied On August 10, 2015 06:25 PM UTC

sorry the code are missing

======

< ej:Grid ID="Grid1" runat="server" AllowPaging="True" AllowFiltering="True" AllowSorting="True" MinWidth="0" AllowTextWrap="True" EnablePersistence="true" >

            < DataManager Adaptor="WebMethodAdaptor" URL="PromotionExplorer.aspx/GetData" / >
            < ClientSideEvents ActionBegin="actionbegin" / >
           
            < Columns >
                < ej:Column Template
                    ..................................
                    ..........

=========
< script type="text/javascript" >

        function actionbegin(args) {
            //if (args.requestType == "filtering" && args.currentFilterObject[0].operator == "startswith")
            //    args.currentFilterObject[0].operator = "contains";
            alert("requestType " + args.requestType);
            alert("model " + args.model);
            alert("model qry" + args.model.query);
            alert("model ds " + args.model.dataSource);
            alert("model qry ds " + args.model.query.dataSource);
           
            alert("model addParams" + this.model.query.addParams('employeeID', 1));

            alert("DataManager " + args.model.dataSource.DataManager);
           
            //args.requestType
            this.model.query.addParams("employeeID", 1);
            args.model.query.addParams("employeeID", 1);

            //this.model.data.addParams("employeeID", 1);
            //args.model.data.addParams("employeeID", 1);


            //args.model.query.addParams('employeeID', 1);
            //args.query.addParams('employeeID', 1);

            //var grid1 = document.getElementById('Grid1');
           
           
        }

    < /script >

Please help,

Adisorn Sirisomboon
Replied On August 10, 2015 06:29 PM UTC

sorry again that is my test code
===

please see this instead

//in Backend DataExplorer.aspx
[WebMethod]
        [ScriptMethod(ResponseFormat = ResponseFormat.Json)] 
        public static object GetData(Syncfusion.JavaScript.DataManager value, int? employeeID)
        {
            return BindDataSource(value, employeeID); //just data access function
        }

//in UI
< ej:Grid ID="Grid1" runat="server" AllowPaging="True" AllowFiltering="True" AllowSorting="True" MinWidth="0" AllowTextWrap="True" EnablePersistence="true" >
            < DataManager Adaptor="WebMethodAdaptor" URL="DataExplorer.aspx/GetData" / >
            < ClientSideEvents ActionBegin="actionbegin" / >
            < Columns >
                ....

// js
< script type="text/javascript" >
        function actionbegin(args) {
               args.model.query.addParams("employeeID", 1);
         }
< / script >

Ragavee U S [Syncfusion]
Replied On August 11, 2015 09:28 AM UTC

Hi Adisorn,

We have analyzed the reported query and we have considered this query “addParams not working when using WebMethodAdaptor” as a bug and a support incident has been created under your account to track the status of this issue. Please log on to our support website to check for further updates.

https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents

Please get back to us if you need any further assistance.

Regards
Ragavee U S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;