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.