grid control Cell Editing startEdit is not working in the version EXT.Net 2.5.3

  1. #1

    grid control Cell Editing startEdit is not working in the version EXT.Net 2.5.3

    I am migrating Ext.Net 1.6 version to Ext.net 2.5.3 in my Project.

    Requirement:

    I have form with Grid controls,when I click on Add button then it will create New row focus
    with some editable columns.

    My First row column is hidden.

    Issues:

    The Ext.net 1.6 version used the StarEditing keyword, Now it is changing to StarEdit,
    If I implement in my Ext.Net 2.5.3 version the cell edit StarEdit throws error for Null Reference



    Please help me on this issue

    My Code is here
    
                          <ext:Panel ID="pnlEmployer" runat="server" LabelWidth="1" Layout="FormLayout">
                                    <Items>
                                        <ext:GridPanel ID="grdpnlEmployerProfile_Staff" runat="server" Height="200px" 
                                            Border="True" Cls="x-grid-custom" Collapsible="True" 
                                            ColumnLines="True" StoreID="storeEmployerProfile_Staff" 
                                            StripeRows="True" Title="List of Org Staff" TitleCollapse="True" Width="900">    
                                        <Plugins>
                                                <ext:CellEditing ID="CellEditing1" runat="server" ClicksToEdit="1" />
                                            </Plugins>
                                            <TopBar>
                                                <ext:Toolbar ID="tlbrEmployerProfile_Staff" runat="server">
                                                    <Items>
                                                        <ext:Button ID="btnNewEmployerProfile_Staff" runat="server" Icon="Add" Text="New">
    <Listeners>                                                            
                                                        <Click Handler="#{grdpnlEmployerProfile_Staff}.insert(1, {
                                                                  
                                                                                    EmployerProfile_Id : #{hidEmployerProfile_Id}.getValue(),
                                                                                    Salutation : 'Mr',
                                                                                    RoleType_Id : 3
                                                                                    });
                                                                   
                                                                                #{grdpnlEmployerProfile_Staff}.getView().refresh(false);
                                                                                #{grdpnlEmployerProfile_Staff}.getSelectionModel().select(0);
                                                                                #{grdpnlEmployerProfile_Staff}.getView().focusRow(0);
                                                            #{grdpnlEmployerProfile_Staff}.editingPlugin.startEdit(0, 2);" />     
                                                                       
    
                                                            </Listeners> 
                                                            </ext:Button>
                                                        </Items>
                                                </ext:Toolbar>  
                                            </TopBar>
                                            <ColumnModel ID="ColumnModel5" runat="server">
                                                <Columns>
                                                    <ext:RowNumbererColumn ID="RowNumbererColumn1"  runat="server"/>
    
                                                    <ext:NumberColumn ID="NumberColumn1" runat="server" Align="Right" DataIndex="EmployerProfile_Id" Format="0,000" Header="EmployerProfile Id" 
                                                        Hidden="True" Hideable="False" Width="100" />
                                                    
                                                    <ext:Column ID="Column1" runat="server" DataIndex="Salutation" Text="Salutation" Width="80">
                                                        <Editor>
                                                            <ext:ComboBox ID="cbxSalutation" runat="server" AllowBlank="False" 
                                                                DisplayField="Salutation" EmptyText="Select..." 
                                                                MaxLength="20" MinChars="1" MinWidth="80" Mode="Local" StoreID="storeMaster_Salutation" 
                                                                TriggerAction="All" TypeAhead="True" ValueField="Salutation" Width="200">
                                                                <Listeners>                                                               
                                                                </Listeners> 
                                                            </ext:ComboBox>
                                                        </Editor>                                                
                                                    </ext:Column>
    
                                                    <ext:Column ID="Column2" runat="server" DataIndex="RoleType_Id" Text="Role" Width="80">
                                                        <Editor>
                                                            <ext:ComboBox ID="cbxRoleType_Id" runat="server" AllowBlank="False" 
                                                                DisplayField="RoleType" EmptyText="Select..." MaxLength="100" MinChars="1" 
                                                                MinWidth="80" Mode="Local" StoreID="storeMaster_RoleType" TriggerAction="All" 
                                                                TypeAhead="True" ValueField="Id" Width="200">
                                                                <Listeners>                                                                
                                                                </Listeners> 
                                                            </ext:ComboBox>
                                                        </Editor>
                                                        <Renderer Handler="if (Ext.isEmpty(record.data.RoleType_Id)) {
                                                                                return null;
                                                                            } else { 
                                                                                return #{storeMaster_RoleType}.getById(record.data.RoleType_Id).data.RoleType;
                                                                            };" />
                                                    </ext:Column>
    
                                                        </Columns>
                                            </ColumnModel>
                                            </ext:GridPanel>
                                        </Items></ext:Panel>
    Last edited by yenkarthi; Aug 19, 2015 at 3:22 AM.
  2. #2
    Hi @yenkarthi,

    the cell edit StarEdit throws error for Null Reference
    Please post the error details.

    It would be best to provide us with a full runnable sample to reproduce the problem. It is the quickest way you are getting the most helpful answer from us.
  3. #3

    Thanks daniil for your reply and support

    the code is working in this below type

    <ext:Button ID="btnNewEmployerProfile_Staff" runat="server" Icon="Add" Text="New">
                                                   
                                             <Listeners>
                                                     <Click Handler="var grid = #{grdpnlEmployerProfile_Staff},
                                                    store = grid.store;
                                                        store.insert(0, {
                                                                         EmployerProfile_Id : #{hidEmployerProfile_Id}.getValue(),
                                                                         Salutation : 'Mr',
                                                                         RoleType_Id : 3,                                                     
                                                                         Email : '@'                                                                   
    																	});
                                                         #{grdpnlEmployerProfile_Staff}.getView().refresh(false);
    																			#{grdpnlEmployerProfile_Staff}.getSelectionModel().select(0);
    																			#{grdpnlEmployerProfile_Staff}.getView().focusRow(0);
                                                   grid.editingPlugin.startEdit(0, 1);" />

Similar Threads

  1. Editing grid panel cell to modify other.
    By Lisseth in forum 1.x Help
    Replies: 0
    Last Post: Feb 10, 2015, 2:18 PM
  2. Cell Editing startEdit problem
    By glenh in forum 2.x Help
    Replies: 1
    Last Post: Dec 17, 2013, 4:55 AM
  3. [CLOSED] gridpanel - cell editing not working for inserted row
    By PriceRightHTML5team in forum 2.x Legacy Premium Help
    Replies: 1
    Last Post: Oct 08, 2013, 12:29 PM
  4. [CLOSED] Cell editing in the data grid
    By RRD in forum 2.x Legacy Premium Help
    Replies: 3
    Last Post: Jun 19, 2013, 7:01 PM
  5. Grid Panel Cell Editing focus
    By shaileshsakaria in forum 2.x Help
    Replies: 0
    Last Post: Jan 13, 2013, 9:14 AM

Tags for this Thread

Posting Permissions