ASP.NET Server controls
Coolite Toolkit Version 0.5.4 now available for download.
 

Coolite Forums

Welcome Guest ( Login | Register )
 
ASP.NET Server controls
Subscribe
Last Login: Yesterday @ 11:00:05 AM
Posts: 2,
Posted 7/15/2008 2:48:46 PM

Group: Coolite Early Adopter

Just thought I'd throw this out there for thought...

Have you considered basing the ItemsCollection off of System.Web.UI.WebControls.WebControl?

I was just thinking that it'd be nice to be able to insert a control that isn't based off Ext into the mix.  This would broaden the value of Coolite in my opinion.

For example...let's say I'd like to use WebGuage from Infragistic's NetAdvantage product in my application.

Chad
Last Login: Today @ 2:38:25 AM
Posts: 448,
Posted 7/16/2008 10:28:52 AM

Group: Core Development Team
Hi Chad,

If you're adding Controls to the Items property, then they do need to inherit from Coolite.Ext.Web.Component.

You can add any Control to the ContentControls collection. Any Container Control, such as Panel, Window, TabPanel, will accept any Control into their <Content> region or code-behind .ContentControls Collection.

Example

protected void Page_Load(object sender, EventArgs e)
{
    this.Panel1.ContentControls.Add(new LiteralControl("test"));
}


Where did you want to add the other 3rd party control?

Hope this helps.
--
Geoffrey McGill
- Experimentalist
twitter [personal] [coolite]
Last Login: Yesterday @ 11:00:05 AM
Posts: 2,
Posted 7/25/2008 2:04:17 PM

Group: Coolite Early Adopter

Actually, I was just trying to add a stock asp.net control.

Chad
Last Login: 7/27/2008 8:01:45 AM
Posts: 9,
Posted 7/27/2008 12:28:00 AM

Group: Coolite Early Adopter
But how about if i want to put a literal control inside a panel with a 'fit' layout. I cant figure out a way to do this because <ext:FitLayout .. /> only accepts Ext/Coolite controls. Like here's an example:


<ext:Panel ID="ContentArea" runat="server" Title="Contacts">
        <Content>
                <ext:FitLayout runat="server">
                        <iframe id='contentFrame' src='/Contacts/Default.aspx' frameborder='0'></iframe>
                </ext:FitLayout>
        </Content>
</ext:Panel>



This is wrong because FitLayout does not allow an iframe to be placed inside it. Only Ext/Coolite control is allowed.

Currently, i explicitly set the width and height of the iframe to 100% and place it directly inside the panel (without using the layout container) to have the fit layout behavior.


--
Agha
Last Login: Today @ 2:38:25 AM
Posts: 448,
Posted 8/2/2008 2:08:10 PM

Group: Core Development Team
Hi Agha,

If you're using an <iframe>, stretching to fit the panel is a relatively easy task by setting the .Html property.

The following sample demonstrates setting the .Html property with an <iframe> html string.

Example

<ext:Window 
    ID="Panel1"
    runat="server"
    Height="450"
    Width="800"
    Title="Title"
    Html="<iframe width='100%' height='100%' src='http://www.google.com/' frameborder='0'></iframe>"
    />


Of course, the .Html property could also be set from the code-behind.

Example

this.Panel1.Html = string.Format("<iframe width='100%' height='100%' src='{0}' frameborder='0'></iframe>", "http://www.google.com/");


The Layout controls will only directly accept controls which inherit from Coolite.Ext.Web.Component.

Hope this helps.
--
Geoffrey McGill
- Experimentalist
twitter [personal] [coolite]
« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -8:00, Time now is 6:00am