[OPEN] [#1779] File downloading is not working from grid panel with paging

  1. #1

    [OPEN] [#1779] File downloading is not working from grid panel with paging

    We would like to obtain the data from GridPanel with checkbox selected by clicking DownloadButton.

    Before adding PagingToolbar, we were able to call DownloadButtonClicked of aspx.cs by clicking Download Button.
    After adding PagingToolbar, DownloadButtonClicked of aspx.cs are not called even clicking Download Button.


    How can we obtain the records selected in CheckboxSelectionModel from the grid with Paging?

    We are using EXT.net 4.8.3.


    ● Download.aspx.cs
    [DirectMethod]
    public void DownloadButtonClicked(object sender, DirectEventArgs e)
    {
        string json = e.ExtraParams["Values"];
        Dictionary<string, string>[] selectedRows = JSON.Deserialize<Dictionary<string, string>[]>(json);
    }
    ● Download.aspx
    <ext:Panel runat="server" Region="North" Height="45">
        <LayoutConfig>
            <ext:HBoxLayoutConfig Align="Middle" />
        </LayoutConfig>
        <Items>
            <ext:Component runat="server" Flex="1" />
            <ext:Label runat="server" Text="Download" MarginSpec="2 10 2 2" />
            <ext:Button runat="server" ID="DownloadButton" Text="Download">
                <DirectEvents>
                    <Click OnEvent="DownloadButtonClicked" IsUpload="true">
                        <ExtraParams>
                            <ext:Parameter Name="Values" Value="Ext.encode(#{ResultGridPanel}.getRowsValues({selectedOnly:true}))" Mode="Raw" />
                        </ExtraParams>
                    </Click>
                </DirectEvents>
            </ext:Button>
        </Items>
    /ext:Panel>
    
    
    <ext:GridPanel ID="ResultGridPanel"
        runat="server" ColumnLines="true" TitleCollapse="true"
        Region="Center" EnableColumnMove="false" EnableColumnHide="false">
        <Store>
            <ext:Store ID="SearchResultStore" runat="server" OnReadData="ParameterStore_Refresh" PageSize="20">
                <Model>
                    <ext:Model runat="server">
                        <Fields>
                             <ext:ModelField Name="LockItem" Type="String" />
                             <ext:ModelField Name="Item1" Type="String" />
                             <ext:ModelField Name="Item2" Type="String" />
                             <ext:ModelField Name="Item3" Type="String" />
                             <ext:ModelField Name="Item4" Type="String" />
                             <ext:ModelField Name="Item5" Type="String" />
                             <ext:ModelField Name="ItemA1" Type="Date" />
                             <ext:ModelField Name="ItemA2" Type="Date" />
                             <ext:ModelField Name="ItemA3" Type="Date" />
                             <ext:ModelField Name="ItemB1" Type="String" />
                             <ext:ModelField Name="ItemB2" Type="String" />
                             <ext:ModelField Name="ItemB3" Type="String" />
                             <ext:ModelField Name="Item6" Type="Date" />
                             <ext:ModelField Name="ItemC1" Type="Date" />
                             <ext:ModelField Name="ItemC2" Type="Date" />
                             <ext:ModelField Name="ItemC3" Type="Date" />
                             <ext:ModelField Name="ItemD1" Type="String" />
                             <ext:ModelField Name="ItemD2" Type="String" />
                             <ext:ModelField Name="ItemD3" Type="String" />
                             <ext:ModelField Name="Item7" Type="String" />
                             <ext:ModelField Name="Item8" Type="String" />
                        </Fields>
                    </ext:Model>
                </Model>
            </ext:Store>
        </Store>
        <ColumnModel runat="server">
            <Defaults>
                <ext:Parameter Name="Hideable" Value="false" />
                <ext:Parameter Name="CellWrap" Value="true" />
                <ext:Parameter Name="Sortable" Value="true" />
            </Defaults>
            <Columns>
                <ext:ComponentColumn runat="server" ID="LockItemColumn" Text="LockItem" DataIndex="LockItem" Width="250" Locked="true"
                    <Component>
                        <ext:HyperlinkButton runat="server" MarginSpec="0 0 0 10">
                        <Listeners>
                            <Click Fn="LockedItemClicked" />
                        </Listeners>
                        </ext:HyperlinkButton>
                    </Component>
                    <Listeners>
                        <Bind Handler="cmp.setText(record.get('LockItem'))" />
                    </Listeners>
                </ext:ComponentColumn>
                
                <ext:Column runat="server" Text="Title1">
                    <Defaults>
                        <ext:Parameter Name="Hideable" Value="false" />
                        <ext:Parameter Name="CellWrap" Value="true" />
                        <ext:Parameter Name="Sortable" Value="true" />
                        <ext:Parameter Name="Align" Value="Center" />
                    </Defaults>
                    <Columns>
                        <ext:ComponentColumn runat="server" ID="Item1Column" Text="Item1" DataIndex="Item1" Width="100">
                        <Component>
                            <ext:HyperlinkButton runat="server">
                                <Listeners>
                                    <Click Fn="ItemClicked" />
                                </Listeners>
                            </ext:HyperlinkButton>
                        </Component>
                        <Listeners>
                            <Bind Handler="cmp.setText(record.get('Item1'))" />
                        </Listeners>
                        </ext:ComponentColumn>
                        <ext:Column runat="server" ID="Item2Column" Text="Item2" DataIndex="Item2" Width="120" />
                        <ext:Column runat="server" ID="Item3Column" Text="Item3" DataIndex="Item3" Width="120" />
                        <ext:Column runat="server" ID="Item4Column" Text="Item4" DataIndex="Item4" Width="250" />
                        <ext:Column runat="server" ID="Item5Column" Text="Item5" DataIndex="Item5" Width="150" />
                    </Columns>
                </ext:Column>
    
                <ext:Column runat="server" Text="Title2" >
                    <Defaults>
                        <ext:Parameter Name="Hideable" Value="false" />
                        <ext:Parameter Name="CellWrap" Value="true" />
                        <ext:Parameter Name="Sortable" Value="true" />
                        <ext:Parameter Name="Align" Value="Center" />
                    </Defaults>
                    <Columns>
                        <ext:Column runat="server" Text="GroupA">
                            <Defaults>
                                <ext:Parameter Name="Hideable" Value="false" />
                                <ext:Parameter Name="CellWrap" Value="true" />
                                <ext:Parameter Name="Sortable" Value="true" />
                                <ext:Parameter Name="Align" Value="Center" />
                            </Defaults>
                            <Columns>
                                <ext:DateColumn runat="server" ID="ItemA1Column" DataIndex="ItemA1" Format="dd-MMM-yy" Width="100" />
                                <ext:DateColumn runat="server" ID="ItemA2Column" DataIndex="ItemA2" Format="dd-MMM-yy" Width="100" />
                                <ext:DateColumn runat="server" ID="ItemA3Column" DataIndex="ItemA3" Format="dd-MMM-yy" Width="100" />
                            </Columns>
                        </ext:Column>
    
                        <ext:Column runat="server" Text="GroupB">
                            <Defaults>
                                <ext:Parameter Name="Hideable" Value="false" />
                                <ext:Parameter Name="CellWrap" Value="true" />
                                <ext:Parameter Name="Sortable" Value="true" />
                                <ext:Parameter Name="Align" Value="Center" />
                            </Defaults>
                            <Columns>
                                <ext:Column runat="server" ID="ItemB1Column" DataIndex="ItemB1" Width="120" />
                                <ext:Column runat="server" ID="ItemB2Column" DataIndex="ItemB2" Width="120" />
                                <ext:Column runat="server" ID="ItemB3Column" DataIndex="ItemB3" Width="120" />
                            </Columns>
                        </ext:Column>
    
                        <ext:DateColumn runat="server" ID="Item6Column" Text="Item6" DataIndex="Item6" Format="dd-MMM-yy" Width="120" />
    
                        <ext:Column runat="server" Text="GroupC">
                            <Defaults>
                                <ext:Parameter Name="Hideable" Value="false" />
                                <ext:Parameter Name="CellWrap" Value="true" />
                                <ext:Parameter Name="Sortable" Value="true" />
                                <ext:Parameter Name="Align" Value="Center" />
                            </Defaults>
                            <Columns>
                                <ext:DateColumn runat="server" ID="ItemC1Column" DataIndex="ItemC1" Format="dd-MMM-yy" Width="100" />
                                <ext:DateColumn runat="server" ID="ItemC2Column" DataIndex="ItemC2" Format="dd-MMM-yy" Width="100" />
                                <ext:DateColumn runat="server" ID="ItemC3Column" DataIndex="ItemC3" Format="dd-MMM-yy" Width="100" />
                            </Columns>
                        </ext:Column>
    
                        <ext:Column runat="server" Text="GroupD">
                        <Defaults>
                            <ext:Parameter Name="Hideable" Value="false" />
                            <ext:Parameter Name="CellWrap" Value="true" />
                            <ext:Parameter Name="Sortable" Value="true" />
                            <ext:Parameter Name="Align" Value="Center" />
                        </Defaults>
                        <Columns>
                            <ext:Column runat="server" ID="ItemD1Column" DataIndex="ItemD1" Width="120" />
                            <ext:Column runat="server" ID="ItemD2Column" DataIndex="ItemD2" Width="120" />
                            <ext:Column runat="server" ID="ItemD3Column" DataIndex="ItemD3" Width="120" />
                        </Columns>
                        </ext:Column>
    
                        <ext:Column runat="server" ID="Item7Column" Text="Item7" DataIndex="Item7" Width="120" />
                        <ext:Column runat="server" ID="Item8Column" Text="Item8" DataIndex="Item8" Width="120" />
                    </Columns>
                </ext:Column>
            </ext:Column>
        </ColumnModel>
        <BottomBar>
            <ext:PagingToolbar runat="server" HideRefresh="true">
                <Items>
                    <ext:DisplayField runat="server" ID="InfoLabel" Width="105" MarginSpec="0 20 0 20" />
                    <ext:ToolbarFill runat="server" />
                </Items>
            </ext:PagingToolbar>
        </BottomBar>
        <SelectionModel>
            <ext:CheckboxSelectionModel runat="server" Mode="Multi" />
        </SelectionModel>
    </ext:GridPanel>
    ● Error message(JavaScript method error)
    ext.axd?v=4.1.0:12585 Uncaught TypeError: this.getSelectionMemory is not a function
       at constructor.getRowsValues (ext.axd?v=4.1.0:12585)
       at constructor.fn (ext.axd?6302ddfaa9354f1da3a8f853d8c0a5b4:2)
       at call (ext.axd?v=4.1.0:11218)
       at ext.axd?v=4.1.0:4261
       at ext.axd?v=4.1.0:4352
  2. #2
    Hello @mkomiyama!

    It does not make much sense you use IsUpload="true" when what you want is a download. Not just that, you are marking the request as an upload and at the same time you try to pass another parameter, encoded in json. It doesn't look right. Have you based this off any example in our examples explorer?

    Couldn't it be you're missing the Web.config MIME type to allow downloading the file? You can easily test that by hosting a pain file (obeying the extension of the file you are crafting the download for). If it works then your MIME should be set correctly.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Hi @fabricio.murta

    We have deleted this option IsUpload="true" but there was no difference.

    We have not tried "Web.config MIME type to allow downloading " yet, but since this downloading was OK before changing to paging, this is not the cause.

    According to the javascript error message posted yesterday, we are suspecting that the cause of the issue is "getting rows selected in paging" (action before downloading). We would be glad if you can check in this point.
  4. #4
    Hello @mkomiyama!

    Can you reduce your test case (we don't need all those columns/fields to reproduce the issue do we?) and add mock test data so we can reproduce it at our end?

    The paging toolbar changes the grid's data store so that it uses a "filtered" store with partial data each page (when that's local paging), so I believe the answer here would involve getting the grid panel's "non-paging-store".

    Before going to the test case, you may want to check this example, which explores selection over several pages when using the paging toolbar:
    - GridPanel > Paging_and_Sorting > Local_Data_Paging

    It is very likely this example does what you need to handle selection of rows when the paging toolbar is in use.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  5. #5
    Hi @fabricio.murta

    Could you use below and try reproduce in your environment?
    In our investigation, we found out that the error occurs in the following situation.
    EnableLocking="true" in ext:GridPanel

    In the sample you had shared with us, this option is set to "false" judged by the behavior though it is not indicated in the sample script.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridPanelPagingSelection.aspx.cs" Inherits="CIDBWebMock.Test.GridPanelPagingSelection" %>
    
    <%@ Import Namespace="System.Xml" %>
    <script runat="server">
        private object[] TestData
        {
            get
            {
                DateTime now = DateTime.Now;
    
                return new object[]
                {
                    new object[] { "LockItem1", "Item1-1", now, now },
                    new object[] { "LockItem2", "Item1-2", now, now },
                    new object[] { "LockItem3", "Item1-3", now, now },
                    new object[] { "LockItem4", "Item1-4", now, now },
                    new object[] { "LockItem5", "Item1-5", now, now },
                    new object[] { "LockItem6", "Item1-6", now, now },
                    new object[] { "LockItem7", "Item1-7", now, now },
                    new object[] { "LockItem8", "Item1-8", now, now },
                    new object[] { "LockItem9", "Item1-9", now, now },
                    new object[] { "LockItem10", "Item1-10", now, now },
                    new object[] { "LockItem11", "Item1-11", now, now },
                };
            }
        }
    
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                this.Store1.DataSource = this.TestData;
            }
        }
    
        protected void MyData_Refresh(object sender, StoreReadDataEventArgs e)
        {
            this.Store1.DataSource = this.TestData;
            this.Store1.DataBind();
        }
    
        protected void Store1_Submit(object sender, StoreSubmitDataEventArgs e)
        {
            XmlNode xml = e.Xml;
    
            this.Response.Clear();
    
            string strXml = xml.OuterXml;
    
            this.Response.AddHeader("Content-Disposition", "attachment; filename=submittedData.xml");
            this.Response.AddHeader("Content-Length", strXml.Length.ToString());
            this.Response.ContentType = "application/xml";
            this.Response.Write(strXml);
    
            this.Response.End();
        }
    </script>
    
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
    
        <script>
            var exportData = function (selectedOnly) {
                App.GridPanel1.submitData({ selectedOnly: selectedOnly }, { isUpload: true });
            };
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Panel runat="server" Region="North" Height="45">
                <LayoutConfig>
                    <ext:HBoxLayoutConfig Align="Middle" />
                </LayoutConfig>
                <Items>
                    <ext:Component runat="server" Flex="1" />
                    <ext:Label runat="server" Text="Download" MarginSpec="2 10 2 2" />
                    <ext:Button runat="server" ID="DownloadButton" Text="Download">
                        <Listeners>
                            <Click Handler="exportData(true);" />
                        </Listeners>
                    </ext:Button>
                </Items>
            </ext:Panel>
    
            <ext:GridPanel ID="GridPanel1"
                runat="server" ColumnLines="true" TitleCollapse="true"
                Region="Center" EnableColumnMove="false" EnableColumnHide="false" Width="600">
                <Store>
                    <ext:Store ID="Store1" runat="server" PageSize="5" OnReadData="MyData_Refresh" OnSubmitData="Store1_Submit">
                        <Model>
                            <ext:Model runat="server">
                                <Fields>
                                    <ext:ModelField Name="LockItem" Type="String" />
                                    <ext:ModelField Name="Item1" Type="String" />
                                    <ext:ModelField Name="ItemA1" Type="Date" />
                                    <ext:ModelField Name="ItemA2" Type="Date" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Defaults>
                        <ext:Parameter Name="Hideable" Value="false" />
                        <ext:Parameter Name="CellWrap" Value="true" />
                        <ext:Parameter Name="Sortable" Value="true" />
                    </Defaults>
                    <Columns>
                        <ext:Column runat="server" ID="LockItemColumn" Text="LockItem" DataIndex="LockItem" Width="250" Locked="true" />
                        <ext:Column runat="server" Text="Title1">
                            <Defaults>
                                <ext:Parameter Name="Hideable" Value="false" />
                                <ext:Parameter Name="CellWrap" Value="true" />
                                <ext:Parameter Name="Sortable" Value="true" />
                                <ext:Parameter Name="Align" Value="Center" />
                            </Defaults>
                            <Columns>
                                <ext:Column runat="server" ID="Item1Column" Text="Item1" DataIndex="Item1" Width="100" />
                            </Columns>
                        </ext:Column>
    
                        <ext:Column runat="server" Text="Title2">
                            <Defaults>
                                <ext:Parameter Name="Hideable" Value="false" />
                                <ext:Parameter Name="CellWrap" Value="true" />
                                <ext:Parameter Name="Sortable" Value="true" />
                                <ext:Parameter Name="Align" Value="Center" />
                            </Defaults>
                            <Columns>
                                <ext:Column runat="server" Text="GroupA">
                                    <Defaults>
                                        <ext:Parameter Name="Hideable" Value="false" />
                                        <ext:Parameter Name="CellWrap" Value="true" />
                                        <ext:Parameter Name="Sortable" Value="true" />
                                        <ext:Parameter Name="Align" Value="Center" />
                                    </Defaults>
                                    <Columns>
                                        <ext:DateColumn runat="server" ID="ItemA1Column" DataIndex="ItemA1" Format="dd-MMM-yy" Width="100" />
                                        <ext:DateColumn runat="server" ID="ItemA2Column" DataIndex="ItemA2" Format="dd-MMM-yy" Width="100" />
                                    </Columns>
                                </ext:Column>
                            </Columns>
                        </ext:Column>
                    </Columns>
                </ColumnModel>
                <BottomBar>
                    <ext:PagingToolbar runat="server" HideRefresh="true">
                        <Items>
                            <ext:DisplayField runat="server" ID="InfoLabel" Width="105" MarginSpec="0 20 0 20" />
                            <ext:ToolbarFill runat="server" />
                        </Items>
                    </ext:PagingToolbar>
                </BottomBar>
                <SelectionModel>
                    <ext:CheckboxSelectionModel runat="server" Mode="Multi" />
                </SelectionModel>
            </ext:GridPanel>
        </form>
    </body>
    </html>
  6. #6
    Hello @mkomiyama!

    Thanks for the test case, I reproduced the issue. That problem happens because the grid's submitData() method does not support the grid locking feature.

    Bad news is, as Ext.NET 4 is superseded by Ext.NET 5, this issue is not likely to be fixed in a new release (of Ext.NET 4).

    But we have logged it as issue #1779 in GitHub and as soon as it is implemented for Ext.NET 5, we'll post a follow-up here.

    Notwithstanding, given your efforts to provide a runnable test case I believe you more than deserve at least a workaround for this issue -- which is not very tricky to come up with, so here's one suggestion to overcome the issue. Add the following javascript code to your page, and the download button should work:

    Ext.define('gh1779', {
        override: 'Ext.grid.Panel',
        getRowsValues: function (config) {
            var me = this;
    
            if (me.enableLocking && me.getSelectionMemory === undefined) {
                me.getSelectionMemory = function () {
                    return me.normalGrid.getSelectionMemory();
                }
            }
    
            return me.callParent(arguments);
        }
    });
    This will ensure the grid has a getSelectionMemory() method even if locking is enabled. This may not work well if you dynamically enable and disable grid locking at run time; but if locking is always enabled (or always disabled) this should work all the time.

    While this is not going to be the fix we'll use in the released version of Ext.NET (we'll fix directly in the affected code instead of patching with an override) it will be of great relevance your feedback whether this override works in your final project or if it still breaks for some reason, so we're looking forward to your follow up upon testing this!
    Fabrício Murta
    Developer & Support Expert
  7. #7
    Hello @abricio.murta

    Thank you for providing the workaround.

    We tried your script in with the sample program posted before, and it worked.
    However it did not work with our real program.
    Though the javascript error won't appear anymore, also download would not work either.
    Maybe some of the column like columns with links have problem.

    Instead, we have changed the program as below and worked.

    <%@ Page Language="C#" %>
    
    <%@ Import Namespace="System.Xml" %>
    
    <script runat="server">
        private object[] TestData
        {
            get
            {
                DateTime now = DateTime.Now;
    
                return new object[]
                {
                    new object[] { "LockItem1", "Item1-1", now, now },
                    new object[] { "LockItem2", "Item1-2", now, now },
                    new object[] { "LockItem3", "Item1-3", now, now },
                    new object[] { "LockItem4", "Item1-4", now, now },
                    new object[] { "LockItem5", "Item1-5", now, now },
                    new object[] { "LockItem6", "Item1-6", now, now },
                    new object[] { "LockItem7", "Item1-7", now, now },
                    new object[] { "LockItem8", "Item1-8", now, now },
                    new object[] { "LockItem9", "Item1-9", now, now },
                    new object[] { "LockItem10", "Item1-10", now, now },
                    new object[] { "LockItem11", "Item1-11", now, now },
                };
            }
        }
    
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                this.Store1.DataSource = this.TestData;
            }
        }
    
        protected void MyData_Refresh(object sender, StoreReadDataEventArgs e)
        {
            this.Store1.DataSource = this.TestData;
            this.Store1.DataBind();
        }
    
        protected void Store1_Submit(object sender, StoreSubmitDataEventArgs e)
        {
            XmlNode xml = e.Xml;
    
            this.Response.Clear();
    
            string strXml = xml.OuterXml;
    
            this.Response.AddHeader("Content-Disposition", "attachment; filename=submittedData.xml");
            this.Response.AddHeader("Content-Length", strXml.Length.ToString());
            this.Response.ContentType = "application/xml";
            this.Response.Write(strXml);
    
            this.Response.End();
        }
    
        protected void Download_OnDirectClick(object sender, DirectEventArgs e)
        {
            //Obtain ID of the row checked
            RowSelectionModel sm = this.GridPanel1.GetSelectionModel() as RowSelectionModel;
    
            var lst = sm.SelectedRows.Select(n => n.RecordID).ToList();
        }
    </script>
    
    
    <!DOCTYPE html>
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
        <title></title>
    
        <script>
            var exportData = function (selectedOnly) {
                App.GridPanel1.submitData({ selectedOnly: selectedOnly }, { isUpload: true });
            };
        </script>
    </head>
    <body>
        <form id="form1" runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Panel runat="server" Region="North" Height="45">
                <LayoutConfig>
                    <ext:HBoxLayoutConfig Align="Middle" />
                </LayoutConfig>
                <Items>
                    <ext:Component runat="server" Flex="1" />
                    <ext:Label runat="server" Text="Download" MarginSpec="2 10 2 2" />
                    <ext:Button runat="server" ID="DownloadButton" Text="Download">
                        <DirectEvents>
                            <Click OnEvent="Download_OnDirectClick" />
                        </DirectEvents>
    <%-- 
                    <Listeners>
                            <Click Handler="exportData(true);" />
                        </Listeners>
    --%>
                    </ext:Button>
                </Items>
            </ext:Panel>
    
            <ext:GridPanel ID="GridPanel1"
                runat="server" ColumnLines="true" TitleCollapse="true"
                Region="Center" EnableColumnMove="false" EnableColumnHide="false" Width="600">
                <Store>
                    <ext:Store ID="Store1" runat="server" PageSize="5" OnReadData="MyData_Refresh" OnSubmitData="Store1_Submit">
                        <Model>
                            <ext:Model runat="server" IDProperty="LockItem">
                                <Fields>
                                    <ext:ModelField Name="LockItem" Type="String" />
                                    <ext:ModelField Name="Item1" Type="String" />
                                    <ext:ModelField Name="ItemA1" Type="Date" />
                                    <ext:ModelField Name="ItemA2" Type="Date" />
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <ColumnModel runat="server">
                    <Defaults>
                        <ext:Parameter Name="Hideable" Value="false" />
                        <ext:Parameter Name="CellWrap" Value="true" />
                        <ext:Parameter Name="Sortable" Value="true" />
                    </Defaults>
                    <Columns>
                        <ext:Column runat="server" ID="LockItemColumn" Text="LockItem" DataIndex="LockItem" Width="250" Locked="true" />
                        <ext:Column runat="server" Text="Title1">
                            <Defaults>
                                <ext:Parameter Name="Hideable" Value="false" />
                                <ext:Parameter Name="CellWrap" Value="true" />
                                <ext:Parameter Name="Sortable" Value="true" />
                                <ext:Parameter Name="Align" Value="Center" />
                            </Defaults>
                            <Columns>
                                <ext:Column runat="server" ID="Item1Column" Text="Item1" DataIndex="Item1" Width="100" />
                            </Columns>
                        </ext:Column>
    
                        <ext:Column runat="server" Text="Title2">
                            <Defaults>
                                <ext:Parameter Name="Hideable" Value="false" />
                                <ext:Parameter Name="CellWrap" Value="true" />
                                <ext:Parameter Name="Sortable" Value="true" />
                                <ext:Parameter Name="Align" Value="Center" />
                            </Defaults>
                            <Columns>
                                <ext:Column runat="server" Text="GroupA">
                                    <Defaults>
                                        <ext:Parameter Name="Hideable" Value="false" />
                                        <ext:Parameter Name="CellWrap" Value="true" />
                                        <ext:Parameter Name="Sortable" Value="true" />
                                        <ext:Parameter Name="Align" Value="Center" />
                                    </Defaults>
                                    <Columns>
                                        <ext:DateColumn runat="server" ID="ItemA1Column" DataIndex="ItemA1" Format="dd-MMM-yy" Width="100" />
                                        <ext:DateColumn runat="server" ID="ItemA2Column" DataIndex="ItemA2" Format="dd-MMM-yy" Width="100" />
                                    </Columns>
                                </ext:Column>
                            </Columns>
                        </ext:Column>
                    </Columns>
                </ColumnModel>
                <BottomBar>
                    <ext:PagingToolbar runat="server" HideRefresh="true">
                        <Items>
                            <ext:DisplayField runat="server" ID="InfoLabel" Width="105" MarginSpec="0 20 0 20" />
                            <ext:ToolbarFill runat="server" />
                        </Items>
                    </ext:PagingToolbar>
                </BottomBar>
                <SelectionModel>
                    <ext:CheckboxSelectionModel runat="server" Mode="Multi" />
                </SelectionModel>
            </ext:GridPanel>
        </form>
    </body>
    </html>
  8. #8
    Hello, @mkomiyama!

    Yes, avoiding the Ext.grid.Panel.submitData() also works, especially taking advantage of the work DirectEvents does for you in submitting the right data.

    Thanks for sharing the alternative that worked best for you! Still, we will have to take a look on that issue with submission when grid has locking enabled.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Error when downloading a file
    By RaphaelSaldanha in forum 4.x Help
    Replies: 5
    Last Post: Nov 01, 2016, 5:23 AM
  2. Replies: 7
    Last Post: Feb 20, 2015, 1:53 PM
  3. Downloading file after File Upload
    By karan in forum 2.x Help
    Replies: 0
    Last Post: Jul 29, 2013, 3:11 AM
  4. Replies: 1
    Last Post: Nov 02, 2012, 4:07 AM
  5. downloading PDF file
    By unaltro2 in forum 1.x Help
    Replies: 0
    Last Post: Mar 10, 2011, 5:37 PM

Tags for this Thread

Posting Permissions