I have an igGrid as follows:
<%= Html.Infragistics().Grid(Model.Subjects) .ID("teamSubjectGrid") .RenderCheckboxes(true) .PrimaryKey("SubjectId") .UpdateUrl(Url.Action("SaveTeamData")) .Columns(column => { column.For(x => x.SubjectId).HeaderText("").Width("20px").Hidden(true); column.For(x => x.SubjectName).HeaderText("Name").Width("250px"); column.For(x => x.SubjectTag).HeaderText("Id").Width("200px"); column.For(x => x.fTeamMember).HeaderText("Member").Width("100px").DataType("bool"); ; }).Features(features => { features.Paging().Type(OpType.Local).PageSize(10); features.Selection().Mode(SelectionMode.Row).MultipleSelection(false); features.Filtering().Type(OpType.Local); features.Updating().EnableAddRow(false).EditMode(GridEditMode.Row).EnableDeleteRow(false).ColumnSettings(columnSettings => { columnSettings.ColumnSetting().ColumnKey("SubjectId").ReadOnly(true); columnSettings.ColumnSetting().ColumnKey("SubjectName").ReadOnly(true); columnSettings.ColumnSetting().ColumnKey("SubjectTag").ReadOnly(true); columnSettings.ColumnSetting().ColumnKey("fTeamMember"); }); }) .Height("500px") .DataSource(Model.Subjects) .DataBind().Render()%>
The javascript that gets run when a user presses a Save button below the grid is as follows:
function saveChanges() { // // First check we have a team name // teamName = $("#teamNameEntry").val(); if (!teamName) { alert("Please provide a team name"); return; } var webMethod = new String('/KDT/UpdateTeamName'); var parameters = "{'teamId':'" + currentTeamIdString + "', 'teamName':'" + escape(teamName) + "'}";
$.ajax( { type: 'Post', url: webMethod, data: parameters, contentType: "application/json; charset=utf-8", dataType: "json", success: function (msg) { alert("about to call save Changes"); $("#teamSubjectGrid").igGrid("saveChanges"); alert("called save Changes"); $("#editTeamDialog").igDialog('close'); window.location = '/KDT/Teams/' + currentTeamIdString; }, error: function (e) { alert("Sorry there was a problem saving your changes. Please try again."); } });
return true; }
On all browsers the two debug alerts are shown, and in IE 7/8/9/10, Chrome and Firefox the Update Url SaveTeamData is called with no problem.
However using Safari on both a Mac and Windows while the alerts are shown, the Update Url is never called.
I'm using igGrid on another page with the exact same behaviour, IE/Chrome/Firefox are fine, Safari does not call the update url.
I'm using the latest 13.1, fully patched, with jQuery 1.7.2. Safari v5.1.7 on Windows 8 64bit. We've tried Safari on a couple of different Macs and it has the same problem.
Does anyone have any ideas why Safari would not work?
Thanks
Richard
Hello Richard ,
Thank you for posting in our forum.
I’ve tested this on my side on Safari on Windows version . The exact safari version is 5.1.7 (7534.57.2).
The sample uses the latest version of 13.1: 13.1.20131.2217.
On my side it shows the alert and triggers the UpdateUrl as expected when you call the saveChanges method.
Could you test it on your side and let me know whether it works on your side? If the project does not work correctly, this indicates either a problem possibly specific to your environment or a difference in the IG version you’re using. It would be helpful if you can let me know on which versions of Safari you’re testing this.
If the sample is working correctly, this indicates a possible problem in the code of your application. It will help if you can provide a small, isolated sample application that demonstrates the behavior you are seeing.
I’m looking forward to your reply.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://ko.infragistics.com/support