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
215
saveChanges Update Url not called just in Safari
posted

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