[FIXED] [V0.7.0] RowExpander Bug

  1. #1

    [FIXED] [V0.7.0] RowExpander Bug

    Hello,

    Going to start off with a nice simple one this morning; easy to replicate:

    Example.aspx:
    <%@ Page Language="C#" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <script runat="server">
        protected override void OnInit(EventArgs e)
        {
            Control control = Page.LoadControl("Example-Control.ascx");
    
            UserControl.Controls.Add(control);
            
            base.OnInit(e);
        }
    </script>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>Example</title>
    </head>
    <body>
        <form id="form1" runat="server">
            <asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="True" />
            <ext:ScriptManager ID="ScriptManager2" runat="server" StateProvider="PostBack" />
            <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <ContentTemplate>
                    <asp:PlaceHolder ID="UserControl" runat="server" />
                </ContentTemplate>
            </asp:UpdatePanel>
        </form>
    </body>
    </html>
    Example-Control.ascx:
    <%@ Control Language="C#" ClassName="Example_Control" %>
    <%@ Register Assembly="Coolite.Ext.Web" Namespace="Coolite.Ext.Web" TagPrefix="ext" %>
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            Permissions.DataSource = new object[] {
                new object[] { 1, "Permission", "Permission 1" },
                new object[] { 2, "Permission", "Permission 2" },
                new object[] { 3, "Permission", "Permission 3" },
                new object[] { 4, "Permission", "Permission 4" },
                new object[] { 5, "Permission", "Permission 5" },
                new object[] { 6, "Permission", "Permission 6" }
            };
            Permissions.DataBind();
        }
    </script>
    <ext:Store ID="Permissions"
        runat="server"
        AutoLoad="True"
        GroupField="GroupingName">
        <Reader>
            <ext:ArrayReader ReaderID="PermissionId">
                <Fields>
                    <ext:RecordField Name="PermissionId" />
                    <ext:RecordField Name="GroupingName" />
                    <ext:RecordField Name="DisplayName" />
                </Fields>
            </ext:ArrayReader>
        </Reader>
        <SortInfo Field="DisplayName" />
    </ext:Store>
    <ext:TabPanel ID="TabPanel1" runat="server" AutoPostBack="True" DeferredRender="True">
        <Tabs>
            <ext:Tab ID="Tab1" runat="server" Title="Tab 1" AutoHeight="True">
                <Content>
                    Tab 1
                </Content>
            </ext:Tab>
            <ext:Tab ID="Tab2" runat="server" Title="Tab 2" AutoHeight="True">
                <Content>
                    <ext:FitLayout ID="FitLayout1" runat="server">
                        <ext:GridPanel ID="GridPanel"
                            runat="server"
                            StoreID="Permissions"
                            AutoExpandColumn="DisplayName"
                            Height="400"
                            StripeRows="True"
                            Width="300">
                            <ColumnModel>
                                <Columns>
                                    <ext:Column ColumnID="DisplayName" DataIndex="DisplayName" Header="Permission" />
                                </Columns>
                            </ColumnModel>
                            <SelectionModel>
                                <ext:CheckboxSelectionModel ID="PermissionSelection" runat="server" />
                            </SelectionModel>
                            <Plugins>
                                <ExtJS:RowExpander ID="RowExpander" runat="server">
                                    <Template runat="server">
                                        Hello World
                                    </Template>
                                </ExtJS:RowExpander>
                            </Plugins>
                        </ext:GridPanel>
                    </ext:FitLayout>
                </Content>
            </ext:Tab>
        </Tabs>
    </ext:TabPanel>
    Replication steps:

    1. Load page ;)

    If you remove the RowExpander from the GridPanel it will work. Sorry about the <ExtJS /> tags, I use that in my solution this is a quick copy and paste.

    Cheers,
    Timothy
  2. #2

    RE: [FIXED] [V0.7.0] RowExpander Bug

    Hi Timothy,

    the fix in the SVN

  3. #3

    RE: [FIXED] [V0.7.0] RowExpander Bug

    Confirmed works.

    Cheers,
    Timothy

Similar Threads

  1. Image in RowExpander
    By reiben in forum 1.x Help
    Replies: 0
    Last Post: Nov 20, 2010, 3:32 PM
  2. can RowExpander be editable?
    By pank in forum 1.x Help
    Replies: 0
    Last Post: Apr 07, 2009, 7:40 PM
  3. RowExpander
    By mmiocev in forum 1.x Help
    Replies: 0
    Last Post: Apr 06, 2009, 12:56 PM
  4. [FIXED] [V0.7] RowExpander Exception
    By Timothy in forum Bugs
    Replies: 2
    Last Post: Nov 05, 2008, 9:48 AM
  5. Replies: 1
    Last Post: Oct 13, 2008, 6:16 PM

Posting Permissions