PDA

View Full Version : ViewPort demo C# code error?



fazeli
Jun 09, 2008, 11:55 AM
I'm trying to get the ViewPort demo working in my website just to play around with it.

In the code behind file, I've included the Coolite.Ext.Web library and have pasted the code directly from the demo. However, the Add method for the west Accordion, center FitLayout, and viewport BorderLayout provide a compile error stating that a conversion from Coolite.Ext.Web.Accordion/FitLayout/BorderLayout to Coolite.Ext.Web.PanelBase is not possible.

These three objects do not inherit from PanelBase. Is there something I'm doing wrong here? I presume the demo code works for the demo.

Here's one example of the code snippets from the demo that have errors (underlined):


...
// Make Accordion container
Accordion acc = new Accordion();
acc.Animate = true;

// Add Navigation and Settings Panels to Accordion
acc.Items.Add(pnlNavigation);
acc.Items.Add(pnlSettings);

// Add Accordion to West Panel
west.Items.Add(acc);
...

geoffrey.mcgill
Jun 09, 2008, 8:13 PM
Hi fazeli,

I think there might have been an issue in the v0.5.0 build and adding controls to the Items Collection. Just this morning I published v0.5.1 (http://www.ext.net/download/) and it appears to now work properly with the ViewPort/Code-behind sample. I ran the original sample and it rendered perfectly. Try the latest build and let me know if the problem continues.

I'm attaching the ComplexLayout-Csharp.aspx source file to this post.

Hope this helps.