[CLOSED] [1.0] EditableGrid Plugin Error

Page 1 of 2 12 LastLast
  1. #1

    [CLOSED] [1.0] EditableGrid Plugin Error

    I am at a loss, something seemed to change between builds on 1.0.

    I am using the following in a my GridPanel. This was working in past builds.
    <Plugins>
        <ext:EditableGrid ID="EditGrid" runat="server" Enabled="true">
        </ext:EditableGrid>
    </Plugins>
    Now i get this error:

    this.config[a].getCellEditor is not a function
    swfobject(Object { name="a"}, Object { name="b"})WebRes...4887097 (line 18)
    renderEditors(Object { name="startRow"}, Object { name="endRow"})WebRes...4887097 (line 118)
    refresh(Object { name="headersToo"})WebRes...4887097 (line 92)
    swfobject()WebRes...4887097 (line 18)
    DomHelper()WebRes...4887097 (line 7)
    destroy()WebRes...4887097 (line 37)
    DomHelper(Object { name="h"}, Object { name="b"}, Object { name="g"})WebRes...4887097 (line 7)
    DomHelper(Object { name="d"}, Object { name="h"}, Object { name="b"})WebRes...4887097 (line 7)
    DomHelper(Object { name="e"}, Object { name="d"}, Object { name="c"})WebRes...4887097 (line 7)
    DomHelper(Object { name="j"})WebRes...4887097 (line 7)
    f(Object { name="v"}, Object { name="w"}, Object { name="r"}, Object { name="q"})WebRes...4887097 (line 7)
    apply()WebRes...4887097 (line 7)
    [Break on this error] var swfobject=function(){var E="undefi...);Ext.grid.GroupingView.GROUP_ID=1000;
    I am not using Grouping in my grid. So not sure what the group_ID is about in the error.
    The grid builds fine if the plugin is removed and no errors. All data is as I would expect.

    What i can tell is this, I can get rid of the error by doing the following:

    My previous code read:

    <ext:CheckColumn  Editable="true" Header="CCTV"
    DataIndex="cctv" Width="40">
       <Editor>
            <ext:Checkbox ID="Checkbox1" runat="server">
            </ext:Checkbox>
        </Editor>
    </ext:CheckColumn>
    Current code reads:

    <ext:Column  Editable="true" Header="CCTV"
    DataIndex="cctv" Width="40">
       <Editor>
            <ext:Checkbox ID="Checkbox1" runat="server">
            </ext:Checkbox>
        </Editor>
    </ext:Column>
    This look is not what I wanted though.


  2. #2

    RE: [CLOSED] [1.0] EditableGrid Plugin Error

    Hi,

    You cannot use CheckColumn with that plugin because CheckColumn doesn't support editor field (it just emulate inline checkbox and really has no editor object).


    EditableGrid plugin requires column with editor (or column should not be editable)


    Why you don't like to use Column (or BooleanColumn) with Checkbox editor?
  3. #3

    RE: [CLOSED] [1.0] EditableGrid Plugin Error

    Why
    you don't like to use Column (or BooleanColumn) with Checkbox editor?

    Because the client wanted to see a readonly checkbox when not in editing. Not a true false or anything like that. I am thinking with the options on the table that all i can do is use images during non editing to represent what i want?
  4. #4

    RE: [CLOSED] [1.0] EditableGrid Plugin Error

    Hi,

    Because the client wanted to see a readonly checkbox when not in editing
    If column cannot be edited then why do you set Editable="true" for the CheckColumn? EditableGrid plugin force always editing mode therefore I am not sure that clear understood " when not in editing "




  5. #5

    RE: [CLOSED] [1.0] EditableGrid Plugin Error

    But i can choose when to push the plugin or enbable the plugin to the client and use one data table.

    if you disable the plugin and it is a checkcolumn then the display is what the client wants when not doing editing work then I just don't allow the checking to work.
  6. #6

    RE: [CLOSED] [1.0] EditableGrid Plugin Error

    Hi,

    I am not sure that you can disable (remove) that plugin beacause it deactivates some editable and navigation features of the GridPanel. Therefore if you remove that plugin then user cannot editing cells (after click on the cell)
  7. #7

    RE: [CLOSED] [1.0] EditableGrid Plugin Error

    Hi,

    You can use Column with Checkbox editor and the following renderer
    function checkRender(v) {
            return '<div class="x-grid3-check-col' + (v ? "-on" : "") + '">&amp;#160;
    ';
    }
  8. #8

    RE: [CLOSED] [1.0] EditableGrid Plugin Error

    I am actually ok with not being able to edit on the click of a cell. I did see that in my testing. that was actually what i wanted. But didn't consider navigation issues. can you explain more about what that might cause?
  9. #9

    RE: [CLOSED] [1.0] EditableGrid Plugin Error

    Hi,

    can you explain more about what that might cause?
    I think navigation in the grid using keys (moving selection with keys) will be disabled after the plugin init
  10. #10

    RE: [CLOSED] [1.0] EditableGrid Plugin Error

    Vlad,

    Still need help here.

    i have converted my table to now use the following.

     <ext:BooleanColumn  Editable="true" Header="CCTV" 
                                            DataIndex="cctv" Width="40" Align="Center" TrueText="Y" FalseText="N">
                                               <Editor>
                                                    <ext:Checkbox runat="server" />
                                                </Editor>
                                            </ext:BooleanColumn>
    if you double click the cell in regular editing mode the checkbox will be checked when it is 'Y'. Everything looks fine.

    if you then add in.
    
                                   <Plugins>
                                    <ext:EditableGrid runat="server"></ext:EditableGrid>
                                    </Plugins>
    The checkbox will not start out checked for the same cell.

    I just confirmed it doesn't work with the online example from row editor.
    /#/GridPanel/Plugins/RowEditor/

    <%@ Page Language="C#" %>
    
    <%@ Import Namespace="System.Collections.ObjectModel" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server">
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!X.IsAjaxRequest)
            {
                this.Store1.DataSource = new List<object>
                {
                    new { 
                        Name = "Bill Foot", 
                        Email = "bill.foot@object.net", 
                        Start = new DateTime(2007, 2, 5), 
                        Salary = 37000, 
                        Active = true
                    },
                    new { 
                        Name = "Bill Little", 
                        Email = "bill.little@object.net", 
                        Start = new DateTime(2009, 6, 13), 
                        Salary = 53000, 
                        Active = true
                    },
                    new { 
                        Name = "Bob Jones", 
                        Email = "bob.jones@object.net", 
                        Start = new DateTime(2008, 10, 6), 
                        Salary = 70000, 
                        Active = true
                    },
                    new { 
                        Name = "Bob Train", 
                        Email = "bob.train@object.net", 
                        Start = new DateTime(2009, 5, 5), 
                        Salary = 68000, 
                        Active = true
                    },
                    new { 
                        Name = "Chris Johnson", 
                        Email = "chris.johnson@object.net", 
                        Start = new DateTime(2009, 1, 25), 
                        Salary = 47000, 
                        Active = true
                    }
                };
                
                this.Store1.DataBind();
            }
        }
        
    </script>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
        
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head id="Head1" runat="server">
        <title>GridPanel with RowEditor Plugin - Ext.NET Examples</title>
        <link href="../../../../resources/css/examples.css" rel="stylesheet" type="text/css" />
        
       <script type="text/javascript">
       var addEmployee = function (gp) {
                    var grid = gp;
                    grid.getRowEditor().stopEditing();
                    
                    grid.insertRecord(0, {
                        name   : "New Guy",
                        email  : "guy@object.net",
                        start  : (new Date()).clearTime(),
                        salary : 50000,
                        active : true
                    });
                    
                    grid.getView().refresh();
                    grid.getSelectionModel().selectRow(0);
                    grid.getRowEditor().startEditing(0);
                }
                
                var removeEmployee = function (store) {
                    grid.getRowEditor().stopEditing();
                    
                    var s = grid.getSelectionModel().getSelections();
                    
                    for (var i = 0, r; r = s[i]; i++) {
                        store.remove(r);
                    }
                }
       </script>
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" />
            
            <h1>GridPanel with RowEditor Plugin</h1>
            
            <ext:Store ID="Store1" runat="server">
                <Reader>
                    <ext:JsonReader>
                        <Fields>
                            <ext:RecordField Name="name" Mapping="Name" Type="String" />
                            <ext:RecordField Name="email" Mapping="Email" Type="String" />
                            <ext:RecordField Name="start" Mapping="Start" Type="Date" />
                            <ext:RecordField Name="salary" Mapping="Salary" Type="Float" />
                            <ext:RecordField Name="active" Mapping="Active" Type="Boolean" />
                        </Fields>
                    </ext:JsonReader>
                </Reader>
            </ext:Store>
            
            <ext:GridPanel 
                ID="GridPanel1" 
                runat="server"
                Width="600"
                Height="400"
                StoreID="Store1"
                AutoExpandColumn="name"
                Title="Employees">
                <Plugins>
                    <ext:EditableGrid runat="server"></ext:EditableGrid>
                    <%--<ext:RowEditor ID="RowEditor1" runat="server" SaveText="Update" />--%>
                </Plugins>
                <View>
                    <ext:GridView ID="GridView1" runat="server" MarkDirty="false" />
                </View>
                <TopBar>
                    <ext:Toolbar ID="Toolbar1" runat="server">
                        <Items>
                            <ext:Button ID="Button1" runat="server" Text="Add Employee" Icon="UserAdd">
                                <Listeners>
                                    <Click Fn="addEmployee" />
                                </Listeners>
                            </ext:Button>
                            <ext:Button ID="Button2" runat="server" Text="Remove Employee" Icon="UserDelete">
                                <Listeners>
                                    <Click Fn="removeEmployee" />
                                </Listeners>
                            </ext:Button>
                        </Items>
                    </ext:Toolbar>
                </TopBar>
                <SelectionModel>
                    <ext:RowSelectionModel ID="RowSelectionModel1" runat="server" />
                </SelectionModel>
                <ColumnModel>
                    <Columns>
                        <ext:RowNumbererColumn />
                        <ext:Column 
                            ColumnID="name" 
                            Header="First Name" 
                            DataIndex="name" 
                            Width="220" 
                            Sortable="true">
                            <Editor>
                                <ext:TextField ID="TextField1" runat="server" AllowBlank="false" />
                            </Editor>
                        </ext:Column>
                        <ext:Column Header="Email" DataIndex="email" Width="150">
                            <Editor>
                                <ext:TextField ID="TextField2" runat="server" AllowBlank="false" Vtype="email" />
                            </Editor>
                        </ext:Column>
                        <ext:DateColumn 
                            Header="Start Date" 
                            DataIndex="start" 
                            Format="MM/dd/yyyy" 
                            Width="100" 
                            Sortable="true">
                            <Editor>
                                <ext:DateField ID="DateField1" 
                                    runat="server" 
                                    AllowBlank="false" 
                                    MinDate="01.01.2006" 
                                    MinText="Can not have a start date before the Company existed." 
                                    />
                            </Editor>
                        </ext:DateColumn>
                        <ext:NumberColumn 
                            Header="Salary" 
                            DataIndex="salary" 
                            Format="$0,0.00" 
                            Width="100" 
                            Sortable="true">
                            <Editor>
                                <ext:NumberField ID="NumberField1" 
                                    runat="server" 
                                    AllowBlank="false" 
                                    MinValue="1" 
                                    MaxValue="150000" 
                                    />
                            </Editor>
                        </ext:NumberColumn>
                        <ext:BooleanColumn 
                            Header="Active" 
                            DataIndex="active" 
                            Align="Center" 
                            Width="50" 
                            TrueText="Yes" 
                            FalseText="No">
                            <Editor>
                                <ext:Checkbox ID="Checkbox1" runat="server" />
                            </Editor>
                        </ext:BooleanColumn>
                    </Columns>
                </ColumnModel>
            </ext:GridPanel>
        </form>  
    </body>
    </html>
Page 1 of 2 12 LastLast

Similar Threads

  1. How to disable column of EditableGrid Plugin
    By abhijit in forum 1.x Help
    Replies: 2
    Last Post: Mar 06, 2012, 4:26 AM
  2. [CLOSED] EditableGrid Plugin bug
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 9
    Last Post: Oct 24, 2011, 7:31 PM
  3. Replies: 2
    Last Post: Sep 19, 2011, 2:05 PM
  4. [CLOSED] Focus Problem in EditableGrid Plugin
    By kemalyigit in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 18, 2011, 6:00 PM
  5. [CLOSED] EditableGrid Plugin - Problem using Tab key
    By Pablo_Azevedo in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Sep 09, 2010, 1:59 PM

Posting Permissions