RowEditor bug

Page 1 of 4 123 ... LastLast
  1. #1

    RowEditor bug

    Hi there,

    Im using RowEditor plugin in my grid panels. When I double click a row to edit, the editor row pops up and placed upon the appropriate row to edit. But if I click Cancel and then click on a different row to edit it, the editor row is showing up on some other place of panel than the row to edit. Apart from this, the editor is working fine.

    I have attached a screenshot of the bug. Thanks.
    Attached Thumbnails Click image for larger version. 

Name:	ScreenshotBug.png 
Views:	246 
Size:	59.8 KB 
ID:	3049  
    Last edited by reezvi; Aug 02, 2011 at 8:46 PM.
  2. #2
    Hi,

    Please provide a code sample to reproduce the problem.
  3. #3
    Quote Originally Posted by Daniil View Post
    Hi,

    Please provide a code sample to reproduce the problem.
    Hi Daniil,
    Wish I could provide you a complete sample, but it'll take some time. For a quick review, im posting my grid panel here so you can have a look. Please let me know if have done anything incorrect in my code or if you need any more details.

                    <ext:GridPanel ID="grdCountry" runat="server" AnchorHorizontal="100%" Height="400px"
                        Title="Country Info" Region="Center" meta:resourcekey="grdCountryResource1" StopIDModeInheritance="False">
                        <loadmask showmask="True" />
                        <savemask showmask="True" />
                        <SelectionModel>
                            <ext:RowSelectionModel ID="RowSelectionModel1" SingleSelect="True" runat="server"
                                StopIDModeInheritance="False">
                            </ext:RowSelectionModel>
                        </SelectionModel>
                        <Store>
                            <ext:Store ID="storeGrdCountry" runat="server" AutoSave="true" meta:resourcekey="storeGrdCountryResource1"
                                OnRefreshData="GridData_Refresh" SerializationMode="Simple" StopIDModeInheritance="False"
                                OnBeforeStoreChanged="storeGrdCountry_BeforeChanged" OnAfterStoreChanged="storeGrdCountry_AfterChanged"
                                OnBeforeRecordInserted="storeGrdCountry_BeforeInserted" OnBeforeRecordUpdated="storeGrdCountry_BeforeUpdated"
                                OnBeforeRecordDeleted="storeGrdCountry_BeforeDeleted">
                                <Reader>
                                    <ext:JsonReader IDProperty="OID">
                                        <Fields>
                                            <ext:RecordField Name="CountryCode" Mapping="CountryCode" Type="String" />
                                            <ext:RecordField Name="CountryName" Mapping="CountryName" Type="String" />
                                            <ext:RecordField Name="CountryCode_BN" Mapping="CountryCode_BN" Type="String" />
                                            <ext:RecordField Name="CountryName_BN" Mapping="CountryName_BN" Type="String" />
                                            <ext:RecordField Name="CreatedBy" Mapping="CreatedBy" />
                                            <ext:RecordField Name="CreatedDate" Mapping="CreatedDate" Type="Date" DateFormat="yyyy-MM-ddThh:mm:ss" />
                                            <ext:RecordField Name="ModifiedBy" Mapping="ModifiedBy" />
                                            <ext:RecordField Name="ModifiedDate" Mapping="ModifiedDate" Type="Date" DateFormat="yyyy-MM-ddThh:mm:ss" />
                                        </Fields>
                                    </ext:JsonReader>
                                </Reader>
                            </ext:Store>
                        </Store>
                        <View>
                            <ext:GridView ID="GridView1" runat="server" MarkDirty="False" meta:resourcekey="GridViewResource1"
                                StopIDModeInheritance="False">
                                <Templates>
                                    <header visible="False" stopidmodeinheritance="False"></header>
                                </Templates>
                            </ext:GridView>
                        </View>
                        <columnmodel stopidmodeinheritance="False">
                                    <Columns>
                                        <ext:RowNumbererColumn />
                                        <ext:Column ColumnID="CountryCode" Header="Country Code (English)" 
                                            DataIndex="CountryCode" Width="135px"  >
                                            <Editor>
                                                <ext:TextField runat="server" AllowBlank="true" MaxLength="2"
                                                    meta:resourcekey="TextFieldResource1" StopIDModeInheritance="False" />
                                            </Editor>
                                        </ext:Column>
                                        <ext:Column Header="Name (English)" DataIndex="CountryName" 
                                            Width="250px" >
                                            <Editor>
                                                <ext:TextField runat="server" AllowBlank="true" MaxLength="32"
                                                    meta:resourcekey="TextFieldResource2" StopIDModeInheritance="False" />
                                            </Editor>
                                        </ext:Column>
                                        <ext:Column Header="Country Code (Bengali)" DataIndex="CountryCode_BN" Width="135px">
                                            <Editor>
                                                <ext:TextField runat="server" AllowBlank="true" MaxLength="4"
                                                    meta:resourcekey="TextFieldResource3" StopIDModeInheritance="False" />
                                            </Editor>
                                        </ext:Column>
                                        <ext:Column Header="Name (Bengali)" DataIndex="CountryName_BN" 
                                            Width="250px" >
                                            <Editor>
                                                <ext:TextField runat="server" AllowBlank="true" MaxLength="64" 
                                                    meta:resourcekey="TextFieldResource4" StopIDModeInheritance="False" />
                                            </Editor>
                                        </ext:Column>
                                        <ext:ImageCommandColumn Width="110">
                                                <Commands>
                                                    <ext:ImageCommand CommandName="AddDivision" Icon="Add" Text="Add Division">
                                                        <ToolTip Text="Add Division" />
                                                    </ext:ImageCommand>
                                                </Commands>
                                        </ext:ImageCommandColumn>
                                    </Columns>
                                </columnmodel>
                        <DirectEvents>
                            <command onevent="Response_Redirect">
                                        <ExtraParams>
                                            <ext:Parameter Name="OID" Value="record.id" Mode="Raw" />
                                        </ExtraParams>
                                    </command>
                        </DirectEvents>
                        <%--                            <Listeners>
                                    <Command Handler="Ext.net.DirectMethods.SearchCountry();" >
                                        <ExtraParams>
                                                <ext:Parameter Name="oid" Value="id" Mode="Raw" />
                                        </ExtraParams>
                                    </Command>
                                </Listeners>
                        --%>
                        <bottombar>
                                    <ext:PagingToolbar runat="server" PageSize="10" AutoRender="False" 
                                         DisplayInfo="True" meta:resourcekey="PagingToolbarResource1" StopIDModeInheritance="False" />
                                </bottombar>
                        <topbar>
                                    <ext:Toolbar runat="server" AutoRender="False"  
                                        meta:resourcekey="ToolbarResource2" StopIDModeInheritance="False">
                                        <Items>
                                            <ext:Button runat="server" Text="Add New Country" Icon="Add" AutoRender="False" 
                                                 meta:resourcekey="ButtonResource3" 
                                                StopIDModeInheritance="False">
                                                <Listeners>
                                                    <Click Handler="#{wndCountryEntry}.show();"></Click>
                                                </Listeners>
                                            </ext:Button>
                                            <ext:Button runat="server" Text="Remove Country" Icon="Delete" AutoRender="False" 
                                                 meta:resourcekey="ButtonResource4" visible="false"
                                                StopIDModeInheritance="False">
                                                <Listeners>                                            
                                                    <Click Handler="#{grdCountry}.deleteSelected();"></Click>
                                                </Listeners>
                                            </ext:Button>
                                        </Items>
                                    </ext:Toolbar>
                                </topbar>
                        <plugins>
                                <ext:RowEditor runat="server" SaveText="Update" Floating="false"
                                    meta:resourcekey="RowEditorResource1" StopIDModeInheritance="False">
                                </ext:RowEditor>
                            </plugins>
                    </ext:GridPanel>
    Thanks and regards
  4. #4
    Well, at the first look your code looks good. So, waiting for a full sample.

    Some not related to the initial problem note.

    Please clarify what do you set up StopIDModeInheritance="False" for?

    I'm afraid it doesn't make sense in the cases you set up it.
  5. #5
    Hi Daniil,

    Sorry for late reply, I was away. StopIDModeInheritance="False" was auto generated after I created local resource for page's localization. Im trying to prepare a sample app following the snippet and sending you within my earliest. Meanwhile, please let me know if any correction needed.

    Thanks
  6. #6
    Hi Daniil,

    While preparing the sample app, I found out the reason. From my sample, if you remove the Floating="false" property from RowEditor, the prob will get fixed. But in that case another prob will arise. Please follow the given scenerio steps to reproduce what I meant.

    Scenerio A:

    Step 1 - run the given sample as it is without any modification.
    Step 2 - double click on a row to edit then click 'Cancel' in row editor.
    Step 3 - double click on a row (preferably some other row) to edit again. The bug will show up.
    Step 4 - 'Cancel' and follow step 3 to see it again.
    Step 5 - Once the RowEditor is placed upon selected row (click 2+ times on a row to have the placement), keep it there and click 'Add New Country' button in toolbar. You will see the RowEditor's position is behind the Window. This is why I set Floating="false" in RowEditor.

    Scenerio B:

    Step 1 - remove Floating="false" from RowEditor.
    Step 2 - follow steps 2-5 as outlined there in scenerio A. You should see the RowEditor is overlapping modal window for 'Add New Country'.
    Step 3 - you can add Floating="true" in modal window ('wndCountryEntry'), but it's of no use.

    sample app code is given below

    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        
    #region Event Handlers and Listeners
    
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                BindGridCountry();
            }
        }
    
        /// <summary>
        /// 
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void GridData_Refresh(object sender, StoreRefreshDataEventArgs e)
        {
            BindGridCountry();
        }
    
        /// <summary>
        /// Update Event method. Initially declared for updating edited records
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void UpdateEvent(object sender, DirectEventArgs e)
        {
    
        }
    
        #region Grid Handlers
    
        protected void storeGrdCountry_BeforeChanged(object sender, BeforeStoreChangedEventArgs e)
        {
    
        }
    
        //This handler will be calling for each inserted record
        protected void storeGrdCountry_BeforeInserted(object sender, BeforeRecordInsertedEventArgs e)
        {
    
        }
    
        //This handler will be calling for each changed record
        protected void storeGrdCountry_BeforeUpdated(object sender, BeforeRecordUpdatedEventArgs e)
        {
    
        }
    
        //This handler will be calling for each deleted record
        protected void storeGrdCountry_BeforeDeleted(object sender, BeforeRecordDeletedEventArgs e)
        {
    
        }
    
        protected void storeGrdCountry_AfterChanged(object sender, AfterStoreChangedEventArgs e)
        {
    
        }
    
        protected void Response_Redirect(object sender, DirectEventArgs e)
        {
    
        }
    
        #endregion
    
        #endregion
    
        #region Private Methods
    
        /// <summary>
        /// Private method to bind grid data
        /// </summary>
        private void BindGridCountry()
        {
            var store = this.grdCountry.GetStore();
    
            store.DataSource = LoadGridData();
            store.DataBind();
        }
    
        private IList<Object> LoadGridData()
        {
            return new List<object>
                {
                    new { 
                        CountryCode = "AA", 
                        CountryName = "Country A", 
                        CountryCode_BN = "AA bn", 
                        CountryName_BN = "Country A bn", 
                    },
                    new { 
                        CountryCode = "BB", 
                        CountryName = "Country B", 
                        CountryCode_BN = "BB bn", 
                        CountryName_BN = "Country B bn", 
                    }
                };
        }
    
        #endregion
        
    </script>
    
    <asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
    </asp:Content>
    <asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
        <ext:ResourceManager ID="ResourceManager1" runat="server" LicenseKey="" Locale="en-US"
            StopIDModeInheritance="False" />
        <div>
    
            <ext:Window ID="wndCountryEntry" runat="server" Title="Add New Country" Icon="BulletAdd"
                Modal="True" Hidden="True" Draggable="False" AutoHeight="True" MinWidth="500px"
                MinHeight="200px" Plain="True" Padding="5" ButtonAlign="Center" LabelWidth="55"
                Layout="Form" Height="200px" meta:resourcekey="wndCountryEntryResource1" StopIDModeInheritance="False"
                Width="500px">
                <buttons>
                    <ext:Button runat="server" Text="Save" Icon="Disk" AutoRender="False" 
                            meta:resourcekey="ButtonResource1" 
                        StopIDModeInheritance="False">
                        <DirectEvents>
    <%--                        <Click OnEvent="SaveData"/>
    --%>
                        </DirectEvents>
                    </ext:Button>
                    <ext:Button runat="server" Text="Cancel" Icon="Decline" AutoRender="False" 
                            meta:resourcekey="ButtonResource2" 
                        StopIDModeInheritance="False"  >
                        <Listeners>
                            <Click Handler="#{wndCountryEntry}.hide();" />                                                
                        </Listeners>                                                
                    </ext:Button>
                </buttons>
                <LoadMask ShowMask="True" />
                <Items>
                    <ext:Panel ID="pnlCountryEntryEN" runat="server" Title="Country Entry (English)"
                        AutoWidth="True" Layout="Form" AutoHeight="True" AnchorHorizontal="100%" Padding="5"
                        AutoRender="False" meta:resourcekey="pnlCountryEntryENResource1" StopIDModeInheritance="False">
                        <Items>
                            <ext:TextField ID="txtCountryCodeEN" runat="server" FieldLabel="Country Code " AnchorHorizontal="50%"
                                EmptyText="Enter Country Code.." AutoRender="False" MaxLength="2" meta:resourcekey="txtCountryCodeENResource1"
                                StopIDModeInheritance="False" />
                            <ext:TextField ID="txtCountryNameEN" runat="server" FieldLabel="Country Name " AnchorHorizontal="100%"
                                EmptyText="Enter Country Name.." AutoRender="False" MaxLength="32" meta:resourcekey="txtCountryCodeENResource1"
                                StopIDModeInheritance="False" />
                        </Items>
                    </ext:Panel>
                    <ext:Panel ID="pnlCountryEntryBN" runat="server" Title="Country Entry (Bangla)" AutoWidth="True"
                        Layout="Form" AutoHeight="True" AnchorHorizontal="100%" Padding="5" AutoRender="False"
                        meta:resourcekey="pnlCountryEntryBNResource1" StopIDModeInheritance="False">
                        <Items>
                            <ext:TextField ID="txtCountryCodeBN" runat="server" FieldLabel="Country Code " AnchorHorizontal="50%"
                                EmptyText="Enter Country Code.." AutoRender="False" MaxLength="4" meta:resourcekey="txtCountryCodeBNResource1"
                                StopIDModeInheritance="False" />
                            <ext:TextField ID="txtCountryNameBN" runat="server" FieldLabel="Country Name " AnchorHorizontal="100%"
                                EmptyText="Enter Country Name.." AutoRender="False" MaxLength="64" meta:resourcekey="txtCountryCodeENResource1"
                                StopIDModeInheritance="False" />
                        </Items>
                    </ext:Panel>
                </Items>
            </ext:Window>
    
            <ext:Panel ID="pnlCountry" runat="server" Title="Country Info" Height="600px" Layout="BorderLayout"
                Header="False" DefaultPadding="5" DefaultCollapsible="false" DefaultSplit="true"
                meta:resourcekey="pnlCountryResource1" StopIDModeInheritance="False">
                <Items>
                    <ext:GridPanel ID="grdCountry" runat="server" AnchorHorizontal="100%" Height="400px"
                        Title="Country Info" Region="Center" meta:resourcekey="grdCountryResource1" StopIDModeInheritance="False">
                        <loadmask showmask="True" />
                        <savemask showmask="True" />
                        <SelectionModel>
                            <ext:RowSelectionModel ID="RowSelectionModel1" SingleSelect="True" runat="server"
                                StopIDModeInheritance="False">
                            </ext:RowSelectionModel>
                        </SelectionModel>
                        <Store>
                            <ext:Store ID="storeGrdCountry" runat="server" AutoSave="true" meta:resourcekey="storeGrdCountryResource1"
                                OnRefreshData="GridData_Refresh" SerializationMode="Simple" StopIDModeInheritance="False"
                                OnBeforeStoreChanged="storeGrdCountry_BeforeChanged" OnAfterStoreChanged="storeGrdCountry_AfterChanged"
                                OnBeforeRecordInserted="storeGrdCountry_BeforeInserted" OnBeforeRecordUpdated="storeGrdCountry_BeforeUpdated"
                                OnBeforeRecordDeleted="storeGrdCountry_BeforeDeleted">
                                <Reader>
                                    <ext:JsonReader IDProperty="OID">
                                        <Fields>
                                            <ext:RecordField Name="CountryCode" Mapping="CountryCode" Type="String" />
                                            <ext:RecordField Name="CountryName" Mapping="CountryName" Type="String" />
                                            <ext:RecordField Name="CountryCode_BN" Mapping="CountryCode_BN" Type="String" />
                                            <ext:RecordField Name="CountryName_BN" Mapping="CountryName_BN" Type="String" />
                                            <ext:RecordField Name="CreatedBy" Mapping="CreatedBy" />
                                            <ext:RecordField Name="CreatedDate" Mapping="CreatedDate" Type="Date" DateFormat="yyyy-MM-ddThh:mm:ss" />
                                            <ext:RecordField Name="ModifiedBy" Mapping="ModifiedBy" />
                                            <ext:RecordField Name="ModifiedDate" Mapping="ModifiedDate" Type="Date" DateFormat="yyyy-MM-ddThh:mm:ss" />
                                        </Fields>
                                    </ext:JsonReader>
                                </Reader>
                            </ext:Store>
                        </Store>
                        <View>
                            <ext:GridView ID="GridView1" runat="server" MarkDirty="False" meta:resourcekey="GridViewResource1"
                                StopIDModeInheritance="False">
                                <Templates>
                                    <header visible="False" stopidmodeinheritance="False"></header>
                                </Templates>
                            </ext:GridView>
                        </View>
                        <columnmodel stopidmodeinheritance="False">
                                    <Columns>
                                        <ext:RowNumbererColumn />
                                        <ext:Column ColumnID="CountryCode" Header="Country Code (English)" 
                                            DataIndex="CountryCode" Width="135px"  >
                                            <Editor>
                                                <ext:TextField runat="server" AllowBlank="true"
                                                    meta:resourcekey="TextFieldResource1" StopIDModeInheritance="False" />
                                            </Editor>
                                        </ext:Column>
                                        <ext:Column Header="Name (English)" DataIndex="CountryName" 
                                            Width="250px" >
                                            <Editor>
                                                <ext:TextField runat="server" AllowBlank="true"
                                                    meta:resourcekey="TextFieldResource2" StopIDModeInheritance="False" />
                                            </Editor>
                                        </ext:Column>
                                        <ext:Column Header="Country Code (Bengali)" DataIndex="CountryCode_BN" Width="135px">
                                            <Editor>
                                                <ext:TextField runat="server" AllowBlank="true"
                                                    meta:resourcekey="TextFieldResource3" StopIDModeInheritance="False" />
                                            </Editor>
                                        </ext:Column>
                                        <ext:Column Header="Name (Bengali)" DataIndex="CountryName_BN" 
                                            Width="250px" >
                                            <Editor>
                                                <ext:TextField runat="server" AllowBlank="true" 
                                                    meta:resourcekey="TextFieldResource4" StopIDModeInheritance="False" />
                                            </Editor>
                                        </ext:Column>
                                        <ext:ImageCommandColumn Width="110">
                                                <Commands>
                                                    <ext:ImageCommand CommandName="AddDivision" Icon="Add" Text="Add Division">
                                                        <ToolTip Text="Add Division" />
                                                    </ext:ImageCommand>
                                                </Commands>
                                        </ext:ImageCommandColumn>
                                    </Columns>
                                </columnmodel>
                        <DirectEvents>
                            <command onevent="Response_Redirect">
                                        <ExtraParams>
                                            <ext:Parameter Name="OID" Value="record.id" Mode="Raw" />
                                        </ExtraParams>
                                    </command>
                        </DirectEvents>
                        <bottombar>
                                    <ext:PagingToolbar runat="server" PageSize="10" AutoRender="False" 
                                         DisplayInfo="True" meta:resourcekey="PagingToolbarResource1" StopIDModeInheritance="False" />
                                </bottombar>
                        <topbar>
                                    <ext:Toolbar runat="server" AutoRender="False"  
                                        meta:resourcekey="ToolbarResource2" StopIDModeInheritance="False">
                                        <Items>
                                            <ext:Button runat="server" Text="Add New Country" Icon="Add" AutoRender="False" 
                                                 meta:resourcekey="ButtonResource3" 
                                                StopIDModeInheritance="False">
                                                <Listeners>
                                                    <Click Handler="#{wndCountryEntry}.show();"></Click>
                                                </Listeners>
                                            </ext:Button>
                                            <ext:Button runat="server" Text="Remove Country" Icon="Delete" AutoRender="False" 
                                                 meta:resourcekey="ButtonResource4" visible="false"
                                                StopIDModeInheritance="False">
                                                <Listeners>                                            
                                                    <Click Handler="#{grdCountry}.deleteSelected();"></Click>
                                                </Listeners>
                                            </ext:Button>
                                        </Items>
                                    </ext:Toolbar>
                                </topbar>
                        <plugins>
                                <ext:RowEditor runat="server" SaveText="Update" Floating="false"
                                    meta:resourcekey="RowEditorResource1" StopIDModeInheritance="False">
                                </ext:RowEditor>
                            </plugins>
                    </ext:GridPanel>
                </Items>
            </ext:Panel>
        </div>
    </asp:Content>
    Hope it helps. Waiting for your reply and possible solution/s.

    Thanks
  7. #7
    Hi, any updates?
  8. #8
    Apologize, too busy here. I will investigate a bit later (during some days).
  9. #9
    Quote Originally Posted by Daniil View Post
    Apologize, too busy here. I will investigate a bit later (during some days).
    Thanks Daniil. I appreciate your hard works here. I'll be waiting for your resolution. Take care.
  10. #10
    Hi @reezvi,

    Can you post a simple .aspx page to run without any changes (without depending on a master page).

    Also please simplify a sample as much as you can. You can use this technique:
    How to reduce a sample
Page 1 of 4 123 ... LastLast

Similar Threads

  1. RowEditor and AfterEdit
    By alexrodi82 in forum 1.x Help
    Replies: 3
    Last Post: Oct 17, 2011, 6:09 PM
  2. RowEditor Visible
    By threewonders in forum 1.x Help
    Replies: 0
    Last Post: Oct 11, 2011, 3:58 PM
  3. using triggerfield with roweditor
    By jayagupta in forum 1.x Help
    Replies: 1
    Last Post: Sep 20, 2011, 12:42 PM
  4. RowEditor validation
    By reezvi in forum 1.x Help
    Replies: 0
    Last Post: Aug 12, 2011, 6:36 PM
  5. Disable Roweditor
    By jhohan25 in forum 1.x Help
    Replies: 0
    Last Post: Aug 08, 2011, 9:01 PM

Posting Permissions