Quantcast
Channel: DevExpress Support Center (Examples)
Viewing all articles
Browse latest Browse all 7205

Spreadsheet - How to perform a request to the server using jQuery.ajax to get cell values

$
0
0

It is necessary to update the Spreadsheet state before sending a request to the server. Data for jQuery.ajax is prepared manually, so we cannot automatically trigger editor updates.

There are two possible solutions:

1) Use Ajax.BeginForm instead of a custom $.ajax request. So, the required information will be prepared automatically before the form is posted.

2) Call our non-documented OnPost method that collects all required information for the Spreadsheet. Please note that the name or implementation of this method may be changed in the future without any notification.

 

[JScript]
function OnClick(){   var url = "Home/ValidateSpreadsheet/";    Spreadsheet.OnPost();    $.ajax({        type: "POST",        url: url,        data: $('form').serialize(),        success: function(data){            myLabel.SetText(data);       }   });}

 


Viewing all articles
Browse latest Browse all 7205

Trending Articles