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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

CRUD operation not working..

Thread ID:





94027 Apr 19,2010 07:41 AM UTC Apr 20,2010 11:34 AM UTC ASP.NET MVC (Classic) 1
Tags: Grid
Elaine Sum
Asked On April 19, 2010 07:41 AM UTC


I am trying to get the CRUD operations working on my code, but after following the sample code online and the documentation, I am still unable to do either and 'Edit' or 'Add'. Clicking on the 'Edit' button does not do anything and clicking on 'Add' throws back an this._edit object is null. Could someone tell me what is wrong with my code?

This is my Viewpage:

<%= Html.Grid("Home")
.Caption("Orders CRUD")
.Column(column =>
column.Add(c => c.OrderID).HeaderText("Order ID");
column.Add( c => c.ShipName ).HeaderText( "Ship Name" );
column.Add( c => c.ShipCity ).HeaderText( "Ship City" );
column.Add(c => c.ShipCountry).HeaderText("Ship Country");
.ToolBar( tools =>
tools.Add( GridToolBarItems.AddNew )
.Add( GridToolBarItems.Delete )
.Add( GridToolBarItems.Edit)
.Add( GridToolBarItems.Update )
.Add( GridToolBarItems.Cancel );
} )
.Editing(edit =>
edit.AllowNew( true, "Add" )
.AllowDelete( true, "Delete" )
.EditMode( GridEditMode.Normal )
.PrimaryKey( key => key.Add( p => p.OrderID ) );


And Controller:

public ActionResult Index()
return View( _db.Orders.Take( 20 ) );

public ActionResult Index( PagingParams args )
IEnumerable data = _db.Orders.Take( 20 );
return data.GridActions();

public ActionResult Edit(Order orderToUpdate)
_orderCollections.UpdateOrder(1028, orderToUpdate);
catch (Exception ex)

var data = _orderCollections.GetAllOrders();

return data.GridActions();

Attached is my View and Controller code. I am using VS 2010, .NET 4.0 and SyncFusion



Solaiappan R [Syncfusion]
Replied On April 20, 2010 11:34 AM UTC

Hi Elaine,

We apologize for the delay in responding to the forum.
Just to let you know that, our response time would be faster if you contact us through your Direct Trac account, as we provide accelerated support within 24 hours for Direct Trac users and we recommend you to contact us through this service.

In order to perform the CRUD operations, it is necessary to include the “MicrosoftMvcValidation.debug.js” file in the master page which is required for Mvc2.0 Client-side Validation.

<asp:ContentPlaceHolder ID="TitleContent" runat="server" />
" rel="stylesheet" type="text/css" />



This will resolve all the mentioned issues and also the issues encountered while loading the application in IE8 and Mozilla. However we couldn’t reproduce "this_edit.is null" error while clicking the “Add New Record” tool item. Please include the Validation script as mentioned at the start and let us know if you still face any issues with respect to adding a new record. The issue with respect to using the Editing button from toolbar has been confirmed as a defect and we have logged a defect report for the same. The fix for this will be available in maximum of 3 business days. However the records can be easily edited by double clicking on the record and the changes can be saved by clicking the mouse or by pressing the Enter key. We have updated the corresponding incident too with the above mentioned details. Do let us know through the incident if you have any queries, so that it would be easy for us to track the details and provide speedy responses .

Thanks and Regards,


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon 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.Close Icon