I´m using Infragistics.Web.Mvc assembly , version 3.12.1.2023
When I do an Ajax call to update grid datasource , Internet Explorer 8 (8.0.7601.17514) says:"A script on this page may be busy, or it may have stopped responding. You can stop the script now, or continue to see if the script will complete"
References:
<script src="http://ajax.aspnetcdn.com/ajax/jQuery/jquery-1.4.4.min.js" type="text/javascript"></script><script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.11/jquery-ui.min.js" type="text/javascript"></script>
<script type="text/javascript" src="http://ajax.microsoft.com/ajax/jquery.templates/beta1/jquery.tmpl.js"></script>
<script src="@Url.Content("~/Scripts/modernizr-1.7.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/IG/ig.ui.min.js")" type="text/javascript"></script>
<link href="@Url.Content("~/Content/themes/base/jquery.ui.all.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/IGStyles/base/ig.ui.editors.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/IGStyles/base/ig.ui.grid.css")" rel="stylesheet" type="text/css" />
<link href="@Url.Content("~/Content/IGStyles/ig/jquery.ui.custom.css")" rel="stylesheet" type="text/css" />
<script src="@Url.Content("~/Scripts/jquery.unobtrusive-ajax.js")" type="text/javascript"></script>
My method in controller is :
[GridDataSourceAction]
public ActionResult UpdateGridDataSource() {
return PartialView("Index", BankAccountModels.GetAccountList());
}
My View:
<script>
function UpdataGridDataSource(data) {
$("#igGrid4").igGrid("dataSourceObject", data);
$("#igGrid4").igGrid("dataBind");
</script>
<p>
@Ajax.ActionLink("Update GridDataSource", "UpdateGridDataSource", new AjaxOptions { OnSuccess = "UpdataGridDataSource" })
</p>
@(Html.Infragistics().Grid<BankAccount>()
.ID("igGrid4")
.AutoGenerateColumns(false)
.Columns(column =>
{
column.For(x => x.AccountNumber).HeaderText("AccountNumber").DataType("number").Width("100px");
column.For(x => x.AccountDate).HeaderText("AccountDate").DataType("date").Width("300px");
column.For(x => x.AccountType).HeaderText("AccountType").DataType("string").Width("130px");
})
.Features(features =>
features.Updating()
.ColumnSettings(settings =>
settings
.ColumnSetting()
.ColumnKey("AccountType")
.Required(true)
.EditorType(ColumnEditorType.Combo)
.ComboEditorOptions(options =>
options
.DataSource(new List<string> { "A", "B", "C" });
});
//I can´t use null to set DataSource
.DataSource(new List<BankAccount>().AsQueryable())
.DataBind().Height("350px").Width("700px").Render())
Hello bustoscarlos,
Thank you for posting in our forums.
As I see you are using version 12.1 of Infragistics.Web.Mvc assembly
But I see the javascripts/css files names from previous versions : ig.ui.min.js, etc
Since v12.1 the names of the JS files have changed. Now the minified and combined file is infragistics.js
You also have the option to use the Loader in order to pull only the needed resouces
http://help.infragistics.com/NetAdvantage/jquery/2012.1?page=Deployment_Guide_JavaScript_Resouces.html
http://help.infragistics.com/NetAdvantage/jquery/2012.1?page=Deployment_Guide_Styling_and_Theming.html
http://help.infragistics.com/NetAdvantage/jquery/2012.1?page=Using_Infragistics_Loader.html
Please try to modify the project according to the instructions from the help and let us know if you still experience the issue.
Hope this helps.
Hello Georgieva. I modified the project as you said and the problem is solved.
Thanks!!!