[FIXED] [#267] [2.3] Grid RowEditor not working in recent update.....Update button is disabled..

  1. #1

    [FIXED] [#267] [2.3] Grid RowEditor not working in recent update.....Update button is disabled..

    This used to run fine, now the update button is disabled...



    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Error.aspx.cs" Inherits="WarburgPincus.Valuations.Site.Error" %><%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    <script runat="server"> 
        public void SaveInvestment(object o, DirectEventArgs e)
        {
            //get the row being added and save
            string json = e.ExtraParams["Values"];
          
        }
    
    
    </script>   
    <ext:XScript runat="server" >
    <script type="text/javascript">
        var Exhibit = {}; //namespace
        Exhibit.Investment = (function(){
            return{
                //Public members
                addInvestment : function () {
                    var grid = #{gridInvestmentCapital};
                    grid.editingPlugin.cancelEdit();
    
    
                    // Create a record instance through the ModelManager
                    var r = Ext.ModelManager.create({
                        PortfolioCompanyId:1,
                        FundId:2,
                        DateOf: new Date(),
                        Activity: '',
                        Description: '',
                        Amount: 0,
                    }, 'Investment');
    
    
                    grid.store.insert(0, r);
                    grid.editingPlugin.startEdit(0, 0);
                },
                removeInvestment:function () {
                    var grid = #{gridInvestmentCapital},
                        sm = grid.getSelectionModel();
    
    
                    grid.editingPlugin.cancelEdit();
    
    
                    var recs=sm.getSelection();
                    recs.forEach(function (r)
                    {
                        App.direct.DeleteInvestment(r.data.ExInvestedCapitalId);
                    });
                    grid.store.remove(sm.getSelection());
                    if (grid.store.getCount() > 0) {
                        sm.select(0);
                    }
                }
            }
        })();
    </script>
    </ext:XScript>
    
    
    <!DOCTYPE html>
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
    </head>
    <body>
        <ext:ResourceManager runat="server" ID="Resource1" Theme="Neptune">
        </ext:ResourceManager>
    
    
        <form id="form1" runat="server">
              <ext:GridPanel runat="server" ID="gridInvestmentCapital" Height="400" Border="false" Hidden="false">
            <TopBar>
                <ext:Toolbar ID="Toolbar1" runat="server">
                    <Items>
                        <ext:Button ID="btnAddInvestment" runat="server" Text="Add Invesment" Icon="MoneyDollar">
                            <Listeners>
                                <Click Fn="Exhibit.Investment.addInvestment" />
                            </Listeners>
                        </ext:Button>
                        <ext:Button ID="btnRemoveInvesment" runat="server" Text="Remove Invesment" Icon="MoneyDollar" Disabled="true">
                            <Listeners>
                                <Click Fn="Exhibit.Investment.removeInvestment" />
                            </Listeners>
                        </ext:Button>
                        <ext:Button ID="Button3" runat="server" Text="Preview" Icon="Eye">
                          
                        </ext:Button>
                    </Items>
                </ext:Toolbar>
            </TopBar>
            <Store>
                <ext:Store
                    ID="storeInvestmentCapital"
                    runat="server"
                    RemoteSort="true"
                    PageSize="100">
                    <Model>
                        <ext:Model ID="Model1" runat="server" IDProperty="ExInvestedCapitalId" Name="Investment">
                            <Fields>
                                <ext:ModelField Name="ExInvestedCapitalId" Type="Int" />
                                <ext:ModelField Name="PortfolioCompanyId" />
                                <ext:ModelField Name="FundId" Type="Int" />
                                <ext:ModelField Name="DateOf" Type="Date" />
                                <ext:ModelField Name="Activity" Type="string" />
                                <ext:ModelField Name="Description" Type="String" />
                                <ext:ModelField Name="Amount" Type="Float" />
                            </Fields>
                        </ext:Model>
                    </Model>
                </ext:Store>
            </Store>
            <ColumnModel>
                <Columns>
                    <ext:DateColumn ID="DateColumn1" runat="server"
                        Text="Date"
                        DataIndex="DateOf"
                        Format="MM/yyyy"
                        Width="75">
                        <Editor>
                            <ext:DateField ID="DateField1"
                                runat="server"
                                AllowBlank="false" EmptyText="Need a date."
                                Format="MM/yyyy"
                                MinDate="01.01.2006"
                                MinText="Can not have a start date before the Company existed."
                                MaxDate="<%# DateTime.Now %>"
                                AutoDataBind="true" />
                        </Editor>
                    </ext:DateColumn>
                    <ext:Column ID="Column2" runat="server" DataIndex="Activity" Text="Invesment Activity" Width="150">
                        <Editor>
                            <ext:ComboBox runat="server" ID="cmboActivity" EmptyText="Select Activity" TypeAhead="true" QueryMode="Local" Editable="true"
                                DisplayField="Activity" ValueField="Activity" MinChars="1" MatchFieldWidth="false">
                                <Store>
                                    <ext:Store runat="server" ID="storeActivity">
                                        <Model>
                                            <ext:Model ID="Model4" runat="server">
                                                <Fields>
                                                    <ext:ModelField Name="Activity" Type="string" Mapping="Activity" />
                                                </Fields>
                                            </ext:Model>
                                        </Model>
                                    </ext:Store>
                                </Store>
                            </ext:ComboBox>
                        </Editor>
                    </ext:Column>
                    <ext:Column ID="Column3" runat="server" DataIndex="Description" Text="Description" Flex="1">
                        <Editor>
                            <ext:TextField ID="TextField1" runat="server" AllowBlank="false" EmptyText="Enter description here..." BlankText="Must enter a description" />
                        </Editor>
                    </ext:Column>
                    <ext:NumberColumn ID="NumberColumn1"
                        runat="server"
                        Text="Investment"
                        DataIndex="Amount"
                        Format="$0,0">
                        <Editor>
                            <ext:TextField ID="NumberField1"
                                runat="server"
                                AllowBlank="false"
                                MaskRe="/[0-9\-\$\.]/" />
                        </Editor>
                    </ext:NumberColumn>
                </Columns>
            </ColumnModel>
            <Plugins>
                <ext:RowEditing ID="RowEditing1" runat="server" ClicksToMoveEditor="1" AutoCancel="false" SaveBtnText="Add Investment" ErrorSummary="false">
                    <DirectEvents>
                        <Edit OnEvent="SaveInvestment" Success="#{gridInvestmentCapital}.getStore().commitChanges();">
                            <EventMask Msg="Saving.." MinDelay="0" ShowMask="true" />
                            <ExtraParams>
                                <ext:Parameter Name="Values" Value="Ext.encode(#{gridInvestmentCapital}.getRowsValues({selectedOnly : true}))" Mode="Raw" />
                            </ExtraParams>
                        </Edit>
                    </DirectEvents>
                </ext:RowEditing>
            </Plugins>
            <Listeners>
                <SelectionChange Handler="#{btnRemoveInvesment}.setDisabled(!selected.length);" />
            </Listeners>
        </ext:GridPanel>
        </form>
    </body>
    </html>
    Last edited by Daniil; Apr 27, 2016 at 12:21 PM. Reason: [FIXED] [#267] [2.3]
  2. #2
    It is known bug, please see
    http://www.sencha.com/forum/showthre...nges-correctly

    That thread contains override which fix the issue
  3. #3
    Quote Originally Posted by Vladimir View Post
    It is known bug, please see
    http://www.sencha.com/forum/showthre...nges-correctly

    That thread contains override which fix the issue

    Any idea when it will be fixed in trunk?
  4. #4
    Hello!

    We cannot provide any information when this bug will be fixed. However, it seems to be a serious bug so I think Sencha will fix it soon.

    Temporarily, you can use workaround from the following threads:
    http://www.sencha.com/forum/showthread.php?265173
    http://www.sencha.com/forum/showthread.php?264529

    We have created an issue to track this defect: https://github.com/extnet/Ext.NET/issues/267
  5. #5
    This bug looks to be a show stopper for RowEditing.

    So, we committed the fix to the SVN trunk, revision #5194.

Similar Threads

  1. how to update data using ext RowEditor plugin
    By reezvi in forum 1.x Help
    Replies: 27
    Last Post: Nov 17, 2011, 5:50 AM
  2. [CLOSED] when roweditor in Add/Update mode
    By vali1993 in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Dec 09, 2010, 5:22 PM
  3. Replies: 0
    Last Post: Nov 14, 2010, 1:55 AM
  4. Plugin roweditor only for update grid
    By Fabrizio in forum 1.x Help
    Replies: 1
    Last Post: Jul 09, 2010, 12:55 PM
  5. [FIXED] [V0.8.2] error after recent update
    By [WP]joju in forum Bugs
    Replies: 10
    Last Post: Sep 09, 2009, 10:38 AM

Posting Permissions