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

How to resolve 'Value cannot be null' exception during post back

Platform: ASP.NET MVC (Classic) |
Control: Grid |
Published Date: July 8, 2014 |
Last Revised Date: July 10, 2014 |
.NET Framework: 4.5 |
Product Version: 12.1.0.43
Tags: general

How to resolve theValue cannot be null exception in Grid.

This exception is raised when GridAction is returned on an external AJAX Post. The cause for this exception is PagingParams is Null.

Use a condition to check whether the Post is external AJAX Post. It can be done by checking whether any of the values in PagingParams are null using the code if(args.ID == null) because for external AJAX Post PagingParams will always be null. If it is null don’t return GridAction instead return respective action result here we return Partial View so that this exception is resolved.

CSHTML:

 

CONTROLLER:

 

ADD COMMENT
You must log in to leave a comment

Please sign in to access our KB

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