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); } });}