Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Unigrid not shown in the toolbox and error: Web Application physical path is not initialized View modes: 
User avatar
Member
Member
nqwebdev1 - 7/31/2012 10:21:43 AM
   
Unigrid not shown in the toolbox and error: Web Application physical path is not initialized
Hello,

I've got 2 questions:
1) When I install the cms.controls.dll, unigrid is not shown in the toolbox in Visual Studio. I tried looking for unigrid everywhere but couldn't find it. What did I do wrong? I even tried cms.uicontrols.dll but it's not there either.

2) When I want to see the preview in Design mode of my newly created module, I got an error "Error Rendering Control" - "An unhandled exception has occured. [SettingsKeyProvider.WebApplicationPhysicalPath]: Web Application physical path is not initialized. You must call CMSContext.Init() before running any of your actions".

I tried adding Appcode/Global.asax.cs with the following method but it still gives me that error. What did I do wrong?

protected void Application_Start(object sender, EventArgs e)
{
CMS.VirtualPathHelper.VirtualPathHelper.RegisterVirtualPathProvider();
}

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/6/2012 3:28:49 AM
   
RE:Unigrid not shown in the toolbox and error: Web Application physical path is not initialized
Hi,

1. Unigrid is not included in the cms.controls namespace and it was not prepared for the toolbox. You need to write and register it manually. I am sorry for this inconvenience.

2. you need to call the CMSContext.Init() in the codee behind of the page where are you adding the control.

Best regards,
Juraj Ondrus

User avatar
Member
Member
nqwebdev1 - 8/7/2012 2:00:55 PM
   
RE:Unigrid not shown in the toolbox and error: Web Application physical path is not initialized
Hi Juraj,

Thanks for the reply. I am able to create Unigrid-based tabular display and it's already working but still stuck on the Design view mode in VS Studio

I've put CMSContext.Init in Page_Load but it's still not showing when I switch to Design view.. can you please help/elaborate your explanation #2?
-------
protected void Page_Load(object sender, EventArgs e)
{
CMSContext.Init();
}
-------

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/10/2012 6:17:13 AM
   
RE:Unigrid not shown in the toolbox and error: Web Application physical path is not initialized
Hi,

The code file where are you using it - is it within the Kentico project or not? If not, pleae see this documentation how to use controls outside Kentico.

Best regards,
Juraj Ondrus

User avatar
Member
Member
nqwebdev1 - 8/10/2012 9:43:09 AM
   
RE:Unigrid not shown in the toolbox and error: Web Application physical path is not initialized
Hi jurajo,
Yes, it is, inside ~/CMSModules/Tools

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 8/11/2012 12:14:32 AM
   
RE:Unigrid not shown in the toolbox and error: Web Application physical path is not initialized
Hi,

So, what are you trying to do? Are you inheriting from correct class? Have you followed the documentation on how to create custom modules?

Best regards,
Juraj Ondrus