Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
645
send parameter to paging
posted

Hi,

I want to send data, when I Paging the grid.
How could I pass?
I would do as you do to save your changes.
Bring in the value "ig_transactions" through the Request.Form ("").

code your Save changes:

Public Function EditingSaveChanges() As ActionResult
ViewData("GenerateCompactJSONResponse") = False
Dim m As New GridModel()
Dim transactions As List(Of Transaction(Of Persona)) = m.LoadTransactions(Of Persona)(HttpContext.Request.Form("ig_transactions"))
For Each t As Transaction(Of Object) In transactions

.

.

.

Next

return JsonResult()

End function

I would do the same when paging.

I append into code HTML element <input type="hidden" name="tipo" value="@Model.myProperty" />

But y don't see a form when call method to paging.

And I don't know where append this element.

could be done?

Thanks in Advanced

Best Regards

  • 17559
    posted

    Hello nitaGM ,

    I was just wondering did you have a chance to try my suggestion. If you still need any assistance on the matter, please do not hesitate to ask.

  • 17559
    posted

    Hello nitaGM ,

     

    You can take a look at our remote-paging functionality:

    http://ko.infragistics.com/products/jquery/sample/data-source/remote-paging 

    In this case you override the internal function that we used in order to send a get request to the server. This function is named _processReqest. In order to use it you can try the following code snippets:

     

                                    ds = $("#grid1").data("igGrid").dataSource;                                        

                                                                    ds._processRequest= function (options) {

                                                    // trigger the call

                                                   

                                                    if (this.settings.responseDataType === 'jsonp') {

                                                                                   

    //this is the row that  I changed

                                                    options.data.someData="someDataSend";

                                                   

                                                                    $.getJSON(options.url, options.data, $.proxy(this._jsonpFilter, this));

                                                    } else {

                                                                    $.ajax(options);

                                                                    /*

                                                                    $.ajax({

                                                                    url: url,

                                                                    // do not specify a dataType, let jQuery detect the response type, and filter the data later on.

                                                                    dataType: dataType,

                                                                    async: true,

                                                                    context: this,

                                                                    data: params,

                                                                    contentType: contentType,

                                                                    cache: false,

                                                                    dataFilter: dataFilterFunction,

                                                                    success: successCallback,

                                                                    complete: completeCallback,

                                                                    error: errorCallback

                                                                    });

                                                                    */

                                                    }

                                    };

                                   

                                                    ds.dataBind();                  

     

    In this approach I just override the _processReqeust of the igDataSource and add some additional parameters to the data that we send internally to the server during the paging:

                    options.data.someData="someDataSend";

    this way the igGrid will still send the data for the requested paging in the request along with your information:

    someData:someDataSend

     

    If you need any additional information on this matter please do not hesitate to ask.