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.
Unfortunately, activation email could not send to your email. Please try again.

ASP.NET MVC 4 Grid Javascript error on column sort

Thread ID:

Created:

Updated:

Platform:

Replies:

109626 Jun 24,2013 12:27 PM Jun 26,2013 01:55 AM ASP.NET MVC (Classic) 2
loading
Tags: Grid
Sorin Rojea
Asked On June 24, 2013 12:27 PM

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}

 


Sorin Rojea
Replied On June 24, 2013 01:36 PM

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

Thanks.

 

 


Satheeskumar S [Syncfusion]
Replied On June 26, 2013 01:55 AM

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


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.

;