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

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

Platform: ASP.NET Web Forms (Classic) |
Control: GridGroupingControl


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.


//setting the ImageFilesPath and ScriptFilesPath in code.

this.GridGroupingControl1.ImageFilesPath= String.Empty;

this.GridGroupingControl1.ScriptFilesPath= String.Empty;


'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.

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.

Up arrow icon

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

Live Chat Icon For mobile