Breaking changes migrating from Ext.NET v1 to v2

Page 2 of 2 FirstFirst 12
  1. #11
    Quote Originally Posted by Hlodvig View Post
    Because they were not rendered correctly without it - panels and controls were not sized correctly while switching tabs. But it was in the v1.7 and maybe it was fixed in 2.3, I'll check.
    And I still have to set layout on tabs to 'fit' and set layout on formpanel to 'form' to get tabs content sized correctly...
  2. #12
    Seems the main point here is mixing up Content and Items. I have a feeling (maybe, misunderstood something) that you insist on a possibility to use a container's Items and Content together and the main argument is the fact that it worked in Ext.NET v1. Well, if it worked in v1 in some cases, it was definitely a trick/hack. They must not be used together in v1 as well as in v2. It is not supported and I am not sure how we could do that. Maybe, we should throw an exception in that case. We will investigate it.

    If you have a scenario when you "have to" use Content and Items together, let's discuss it in details in an individual thread.
  3. #13
    Quote Originally Posted by Daniil View Post
    Seems the main point here is mixing up Content and Items. I have a feeling (maybe, misunderstood something) that you insist on a possibility to use a container's Items and Content together and the main argument is the fact that it worked in Ext.NET v1. Well, if it worked in v1 in some cases, it was definitely a trick/hack. They must not be used together in v1 as well as in v2. It is not supported and I am not sure how we could do that. Maybe, we should throw an exception in that case. We will investigate it.

    If you have a scenario when you "have to" use Content and Items together, let's discuss it in details in an individual thread.
    No, the main point here is that I insist on a possibility to add non-ext.Net widgets to the contaner's Content with the layout set because "Content is not ruled out by the layout".
    Mixing of items and content is very rare case and I have it in one place and if it's prohibited - ok, no problem.
    Also I insist that there is a bug that Content is ruled out by layout.
    Check the following example:
    <%@ Page Language="C#" %>
    
    <!DOCTYPE html>
    <html>
    <head runat="server">
        <title>Ext.NET Examples</title>
    </head>
    <body>
        <ext:ResourceManager runat="server" />
        <form runat="server">
            <ext:Panel runat="server" Title="Title" Layout="FormLayout">
                <Content>
                    <div>
                        <ext:TextField runat="server" FieldLabel="TextField1" Width="300" />
                    </div>
                </Content>
            </ext:Panel>
            <ext:Panel runat="server" Title="Title" Layout="FitLayout">
                <Content>
                    <div>
                        <ext:TextField runat="server" FieldLabel="TextField2" Width="300" />
                    </div>
                </Content>
            </ext:Panel>
        </form>
    </body>
    </html>
    Click image for larger version. 

Name:	Capture.PNG 
Views:	21 
Size:	10.1 KB 
ID:	7242

    Don't you think that text field should be 300px wide in both cases? So this is a breaking change or a bug.
    Last edited by geoffrey.mcgill; Nov 22, 2013 at 5:51 AM. Reason: Removed unnecessary code
  4. #14
    And I still have to set layout on tabs to 'fit' and set layout on formpanel to 'form' to get tabs content sized correctly...
    Layout doesn't manage content at all. Layout affects on Items only. If you set Layout then Content will be considered as Items
    Can you provide a test case when Layout is required for Content?

    Also I insist that there is a bug that Content is ruled out by layout.
    Just remove Layout property and Content will no be considered as Items and content will not be participated in layout logic (after transformation content to items)

    Don't you think that text field should be 300px wide in both cases? So this is a breaking change or a bug.
    As I mentioned before, if you set Layout for container then all widgets inside Content will be considered as items (LiteralControl like 'div' will be ignored). Therefore in your example, both fields will be involved to layout logic. Just remove Layout property for containers to have 300px width
  5. #15
    Quote Originally Posted by Vladimir View Post
    Layout doesn't manage content at all. Layout affects on Items only. If you set Layout then Content will be considered as Items
    I see, everything is clear now. I didn't know that Content will be considered as Items when Layout is set.

    Quote Originally Posted by Vladimir View Post
    Can you provide a test case when Layout is required for Content?
    http://forums.ext.net/showthread.php...stead-of-Items
    TextField and Grid are there just as an example. In real life user controls there which cannot be added to Items collection.
  6. #16
    So what about the bug with repeater inside of Panel's Content?
    Such construction
    		<ext:Panel ID="SolutionsPanel" runat="server" BodyPadding="5" Frame="true">
    			<Content>
    				<asp:Repeater runat="server" ID="SolutionsRepeater" OnItemDataBound="SolutionsRepeater_OnItemDataBound">
    					<ItemTemplate>
    						<uc:solutionAbonnement runat="server" ID="Solution" />
    						<br />
    					</ItemTemplate>
    				</asp:Repeater>
    			</Content>
    		</ext:Panel>
    is not working.

    Even this
    <ext:Panel ID="SolutionsPanel" runat="server" BodyPadding="5" Frame="true">
    			<Items>
    				<ext:Container runat="server">
    					<Content>
    						<asp:Repeater runat="server" ID="SolutionsRepeater" OnItemDataBound="SolutionsRepeater_OnItemDataBound">
    							<ItemTemplate>
    								<uc:solutionAbonnement runat="server" ID="Solution" />
    								<br />
    							</ItemTemplate>
    						</asp:Repeater>
    					</Content>
    				</ext:Container>
    			</Items>
    		</ext:Panel>
    is not working.

    [16:52:31.646] ReferenceError: BodyContent_MainContent_MonAbonnement_SolutionsRep eater_Solution_0_Tarif_0_TarificationInfoRadio_0 is not defined @ http://127.0.0.1:81/extnet/extnet-al...d?v=41036:1389
    The repeater is not on the page at all... What shall I do? The bug breaks everything and it is a show stopper for me :-(
  7. #17
    The small bits of code sample you provided appear to be configured correctly. We were not able to reproduce the problem.
    Geoffrey McGill
    Founder
  8. #18
    Please create new thread with a sample reproduces the issue
    Just in case, here is my test case which works fine
    <%@ Page Language="C#" AutoEventWireup="true" %>
    
    <%@ Register Src="~/Vlad/Child.ascx" TagPrefix="uc" TagName="Child" %>
    
    <!DOCTYPE html>
    
    <html>
    <head runat="server">
        <title>Ext.NET Example</title>
        <script runat="server">
            protected void Page_Load(object sender, EventArgs e)
            {
                this.SolutionsRepeater.DataSource = new int[] { 1, 2, 3 };
                this.SolutionsRepeater.DataBind();
            }
        </script>
    </head>
    <body>
        <form runat="server">
            <ext:ResourceManager runat="server" />
    
            <ext:Panel runat="server" BodyPadding="5" Frame="true" Height="300">
                <Content>
                    <asp:Repeater runat="server" ID="SolutionsRepeater">
                        <ItemTemplate>
                            <uc:Child runat="server" ID="Solution" />
                            <br />
                        </ItemTemplate>
                    </asp:Repeater>
                </Content>
            </ext:Panel>
        </form>
    </body>
    </html>
    User control
    <%@ Control Language="C#" %>
     
    <ext:Button runat="server" Text="Text" />
    Last edited by geoffrey.mcgill; Dec 03, 2013 at 3:21 PM.
  9. #19
    Quote Originally Posted by Vladimir View Post
    Please create new thread with a sample reproduces the issue
    I guess it has nothing to do with the content and it's the same as http://forums.ext.net/showthread.php...orks-elsewhere
    I'll start new thread
  10. #20
    Here is a related thread to the initial topic of the current thread:
    http://forums.ext.net/showthread.php?27213
Page 2 of 2 FirstFirst 12

Similar Threads

  1. Replies: 9
    Last Post: Dec 12, 2012, 5:04 AM
  2. [CLOSED] Migrating from v1.5 to 2.0.1 differences.
    By ViDom in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: Sep 27, 2012, 1:47 PM
  3. [CLOSED] Migrating to 2: PartialViewResult
    By PhilG in forum 2.x Legacy Premium Help
    Replies: 4
    Last Post: May 21, 2012, 9:27 AM
  4. [CLOSED] Migrating a MVC App from v1 to v2
    By RCN in forum 2.x Legacy Premium Help
    Replies: 2
    Last Post: Apr 10, 2012, 7:05 PM
  5. [CLOSED] Migrating from Coolite to Ext.Net
    By daneel in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jan 19, 2011, 11:44 AM

Posting Permissions