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.

Why am I getting an object reference invalid error at GetResolvedImageFilesPath?

 

The following error at GetResolvedImageFilesPath(String filename) or GetResolvedScriptsFilesPath:

Stack Trace: [NullReferenceException: Object reference not set to an instance of an object.]Syncfusion.Web.UI.WebControls.Grid.Grouping.GridGroupingControl.Syncfusion.Web.UI.WebControls.Grid.Grouping.IImagePropertiesOwner.GetResolvedImageFilesPath(String filename)is caused due to the reason that the grid should be in the Page's control hierarchy when it's render method gets called.To overcome this error, set the following properties.

C#

//setting the ImageFilesPath and ScriptFilesPath in code.

this.GridGroupingControl1.ImageFilesPath= String.Empty;

this.GridGroupingControl1.ScriptFilesPath= String.Empty;

VB

'setting the ImageFilesPath and ScriptFilesPath in code

Me.ImageFilesPath = String.Empty

Me.ScriptFilesPath = String.Empty

Detailed Analysis:

This will cause the grid to write out it's resources to the application directory and access it from there.

The grid control has the images and scripts stored as embedded resources in it's dll and it has the ability to write out the images and scripts and use them on demand. So if grid cannot find the resources in the given ImageFilesPath and ScriptFilesPath, it will make the grid to write out it's resources in the application directory and access it from there. For this to work, the application dir in IIS should be given asp.net runtime write permission. Otherwise the grid will not be able to find it's resources. One way to provide sufficient permissions to the asp.net runtime, to be able to create files under the application directory, is to provide “Full Control” to “Everyone” user in the application directory.

Article ID: Published Date: Last Revised Date: Platform: Control:
706 04/30/2011 07/10/2014 ASP.NET Web Forms (Classic) GridGroupingControl
Tags:
Did you find this information helpful?
Add Comment
You must log in to leave a comment

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.