We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

ASP.NET MVC 4 Grid Javascript error on column sort

My grid looks like this

 

@(Html.Syncfusion().Grid<ViewMandate>("MandateList")

.Datasource(Model)

.Caption("Mandates")

.AutoFormat(Skins.Olive)

.Column(column =>

{

column.Add(m => m.MandateID).HeaderText("MandateID").Visible(false);

column.Add(m => m.Name).HeaderText("Mandate Name");

column.Add(m => m.DocumentOwnerUser).HeaderText("Mandate Owner");

column.Add(m => m.SeniorManagerUser).HeaderText("Senior Manager");

column.Add(m => m.EffectiveDate).HeaderText("Effective Date");

column.Add(m => m.VersionNumber).HeaderText("Version Number");

column.Add(m => m.LastApprovedDate).HeaderText("Last Approved Date");

column.Add(m => m.LastModifiedDate).HeaderText("Last Modified Date");

column.Add(m => m.Status).HeaderText("Mandate Status");

})

.EnableSorting()

.EnableAlternateRowStyling()

.EnableRowHover(true)

.ClientSideEvents(events => events.OnRecordSelectionEvent("OnMandateSelected"))

)

 

My _Layout.cshtml is below

 

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8" />

<meta name="viewport" content="width=device-width" />

<title>@ViewBag.Title</title>

@Styles.Render("~/Content/css")

@Scripts.Render("~/bundles/modernizr")

@Scripts.Render("~/bundles/jquery")

@(Html.Syncfusion().StyleManager().Combine(true).Minify(true)

.Register(component =>

{

component.Add(ComponentType.Grid);

}))

@{Html.Syncfusion().ScriptManager().Combine(true).Minify(true).Render();}

@RenderSection("ScriptSection", required: false)

</head>

<body>

@RenderBody()

@RenderSection("scripts", required: false)

<script type ="text/javascript">

$(function () {

$('#page').css("min-height", $(document).height());

});

</script>

</body>

</html>

 

When I click on a grid column to sort I get this Javascript error

 

Unhandled exception at line 32, column 47477 in http://localhost:59060/MvcResourceHandler.axd?k=js&r=['460735373','857160043','1508235827','-1699388191','-387825988','-645683054','808493855','808795855','1971557338','288472848']&minify=True

0x80004005 - htmlfile: Unspecified error.

 

at this line

 

get_HeaderTable:function(){return(this._gridHeaderTable==null||this._gridHeaderTable.offsetParent==null)&&(this._gridHeaderTable=this.get_$Header().find("table").get(0)),this._gridHeaderTable}

 


2 Replies

SR Sorin Rojea June 24, 2013 05:36 PM UTC

Found what the problem was: I had to add a method in the controller class that accepts HTTP verb POST and returns GridActions.

Thanks.

 

 



SS Satheeskumar S Syncfusion Team June 26, 2013 05:55 AM UTC

Hi Sorin Rojea,

 

 

Thanks for the update.

 

We are happy to hear that your issue has been resolved.

 

Please let us know if you have any other concerns.

 

 

Regards,

Satheeskumar S


Loader.
Live Chat Icon For mobile
Up arrow icon