I would like to (re)use the TabPermissionsGrid control from the Dotnetnuke framework in one of my modules. When I register the control in my module it show ok but I also get an errormessage which I have been unable to trace. I have tried to debug it but cannot find a reason for the error. In the pageload event I set dgPermissions.TabID to the current TabID. Is there anything else I have to set?
This is the error I see below the module:
Unhandled error loading module.
DotNetNuke.Services.Exceptions.ModuleLoadException: Unhandled Error Adding Module to ContentPane ---> System.NullReferenceException: Object reference not set to an instance of an object. at DotNetNuke.Security.Permissions.Controls.TabPermissionsGrid.GetUsers() at DotNetNuke.Security.Permissions.Controls.PermissionsGrid.CreateChildControls() at System.Web.UI.Control.EnsureChildControls() at System.Web.UI.Control.FindControl(String id, Int32 pathOffset) at System.Web.UI.Control.FindControl(String id) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.Globals.FindControlRecursive(Control objParent, String strControlName, String strClientID) at DotNetNuke.UI.Utilities.ClientAPI.RegisterPostBackEventHandler(Control objParent, String strEventName, PostBackEvent objDelegate, Boolean blnMultipleHandlers) at DotNetNuke.UI.Skins.Skin.InjectModule(Control objPane, ModuleInfo objModule, PortalSettings PortalSettings) --- End of inner exception stack trace ---