Breaking changes migrating from Ext.NET v1 to v2

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Breaking changes migrating from Ext.NET v1 to v2

    Hello The Community,

    More and more people are migrating from Ext.NET v1 to v2.

    We add as much breaking changes as we can.
    https://examples2.ext.net/#/Getting_...AKING_CHANGES/

    If we miss something, please post in this thread.

    Thank you.
  2. #2
    ColumnModel event listeners changes:
    <%-- Old --%>
    <Listeners>
           <HiddenChange />
           <ColumnMoved />
    </Listeners>
    
    <%-- New --%>
    <Listeners>
           <Hide />
           <ColumnMove />
    </Listeners>
    GridPanel event listeners changes (please confirm if these replacements are adequate):
    <%-- Old --%>
    <Listeners>
           <RowDblClick />
           <MouseUp  />
    </Listeners>
    
    <%-- New --%>
    <Listeners>
           <ItemDblClick />
           <ItemMouseUp />
    </Listeners>
  3. #3
    Quote Originally Posted by vadym.f View Post
    ColumnModel event listeners changes:
    <%-- Old --%>
    <Listeners>
           <HiddenChange />
           <ColumnMoved />
    </Listeners>
    
    <%-- New --%>
    <Listeners>
           <Hide />
           <ColumnMove />
    </Listeners>
    I added a new item.
    172. The ColumnModel's HiddenChange event has been removed. Please use its ColumnHide and ColumnShow events.
    Also you can listen the Hide and Show event of a Column itself.

    The ColumnModel's ColumnMoved event has been renamed to ColumnMove.

    Quote Originally Posted by vadym.f View Post
    GridPanel event listeners changes (please confirm if these replacements are adequate):
    <%-- Old --%>
    <Listeners>
           <RowDblClick />
           <MouseUp  />
    </Listeners>
    
    <%-- New --%>
    <Listeners>
           <ItemDblClick />
           <ItemMouseUp />
    </Listeners>
    There is the item #118.
    118. The GridPanel's "Row..." events like RowClick, RowDblClick, RowContextMenu, etc.
    have been renamed to ItemClick, ItemDblCLick, ItemContextMenu, etc.
    I updated it.

    118. The GridPanel's "Row..." events like RowClick, RowDblClick, RowContextMenu, etc.
    have been renamed to ItemClick, ItemDblCLick, ItemContextMenu, etc.

    The GridPanel's mouse events - MouseDown, MouseOut, MouseOver, MouseUp - have been removed.
    The new events - ItemMouseDown, ItemMouseEnter, ItemMouseLeave, ItemMouseUp. They fires in the context of a row.
    If you need listen mouse events in the context of a GridPanel itself, please use its events which names contain "...ContainerMouse...".
  4. #4
    I think that there is one more change.

    I have a code smth like that
    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="TestForm.aspx.cs" Inherits="RdC.Front.TestForm" %>
    <script runat="server">
    		protected void Page_Load(object sender, EventArgs e)
    		{
    			List<string> l = new List<string>();
    			l.Add("a");
    			l.Add("b");
    			UniversRepeater.DataSource = l;
    			UniversRepeater.DataBind();
    		}</script>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
    	<title>Ext.NET Examples</title>
    </head>
    <body>
    	<form id="Form1" runat="server">
    		<ext:ResourceManager ID="ResourceManager1" runat="server">
    			<Listeners>
    				<DocumentReady Handler="#{TabPanel1}.add(#{Panel1});  #{TabPanel1}.setActiveTab(0);" />
    			</Listeners>
    		</ext:ResourceManager>
    		<br />
    		<ext:TabPanel ID="TabPanel1" runat="server" />
    		<ext:Panel runat="server" ID="Panel1" Title="Title" Layout="FormLayout">
    			<Content>
    				<asp:Repeater runat="server" ID="UniversRepeater">
    					<ItemTemplate>
    						<li class="univers">
    							<asp:Label runat="server" ID="UniversLabel">Label</asp:Label>
    						</li>
    					</ItemTemplate>
    					<SeparatorTemplate>
    						<li class="separator">&nbsp;</li>
    					</SeparatorTemplate>
    				</asp:Repeater>
    			</Content>
    		</ext:Panel>
    	</form>
    </body>
    </html>
    Well, I know that non-ext.Net widgets are not controlled by layout and that they cannot be added to Items collection. And everything added to Content is not controlled by layout. And that code worked perfectly before.
    But now I receive exception Control with type 'System.Web.UI.WebControls.Repeater' cannot be handled by layout. Stacktrace:
    [Exception: Control with type 'System.Web.UI.WebControls.Repeater' cannot be handled by layout]
    Ext.Net.AbstractContainer.PopulateItems(ControlCol lection contentControls, ItemsCollection`1 contentItems) +616
    Ext.Net.AbstractContainer.get_ItemsProxy() +427
    Ext.Net.AbstractContainer.get_ConfigOptions() +3574
    Ext.Net.AbstractPanel.get_ConfigOptions() +56
    Ext.Net.Panel.get_ConfigOptions() +56
    Ext.Net.ClientConfig.Process(Object obj) +408
    Ext.Net.ClientConfig.Serialize(Object obj, Boolean ignoreCustomSerialization, Boolean quoteName) +1369
    Ext.Net.ClientConfig.Serialize(Object obj, Boolean ignoreCustomSerialization) +290
    Ext.Net.ClientConfig.Serialize(Object obj) +53
    Ext.Net.BaseControl.get_InitialConfig() +127
    Basically it should be considered as a bug, because asp:repeater is added to Content and Layout should't be applied to it.
    But anyway I have to wrap my repeater into container to get it working or remove layout, but this is not working in case when I use it inside of FormPanel or if I need to define layout. So the only solution is to wrap it to the container.

    But hey, why so complicated?.. Why we all have to wrap every non-ext.Net control into container even when it is allowed by the framework? I have all rights to add asp:repeater into Content section without any abstract contaners...
  5. #5
    Seems like this <Content> + <asp:Repeater> is defect. We are investigating.

    As well, defining a .Layout on the <Content> parent (Panel) could be removed because Layouts should be ignored for elements within the <Content> region.
    Geoffrey McGill
    Founder
  6. #6
    Quote Originally Posted by geoffrey.mcgill View Post
    Seems like this <Content> + <asp:Repeater> is defect. We are investigating.
    Please, let me know about results of it

    Quote Originally Posted by geoffrey.mcgill View Post
    As well, defining a .Layout on the <Content> parent (Panel) could be removed because Layouts should be ignored for elements within the <Content> region.
    Yes, I know. It just an example to show that Panel without Layout defined works correctly. Also I have many of FormPanels which are Layout by default.
    BTW, why default layout is an 'anchor', not 'form'?
  7. #7
    If you set Layout property and Items collection is empty then all widgets in Content area will be considered as Items
    Therefore I don't agree that it is a bug, it is expected behaviour (exception), you cannot use Layout and Content with non Ext.Net controls

    but this is not working in case when I use it inside of FormPanel or if I need to define layout.
    Content with non Ext.Net controls should not be used with FormPanel, it has no sense because FormPanel works with items only
    If you "need to define layout" then something wrong in your design because mixing Items (defining Layout assumes that you need Items) and Content is very bad idea and should not be used

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