View Full Version : [CLOSED] GridPanel Column Editor PLUGIN: disable Enter KEY on default button Update and Cancel'

Jun 21, 2013, 3:05 PM
Hi again,

I couldn't get the following simple example to work after adding Daniil suggestion about whole disabling of the enter key adding AfterRender Handler.

<AfterRender Handler="this.editingPlugin.editor.on('afterrender', function () {
Ext.Array.erase(this.keyNav.map.bindings, 0, 1);
});" Delay="1" />

After many tests I found that it works only if at least one column has the Flex attribute set. (???) Why??
Can you explain me why ? I wouldn't want to set one column flex because the fields are few and the flex field will fill the whole remaining space appearing ugly to handle, overall if it is a combo.

try to test it in explorer 10, defining aand then exlcuding the Flex property on the column Email and you get the error
Error: Unable to get property 'on' of undefined or null reference

it doesn't recognize the editorplugin (not yet instantited..)

thanks in advance

<%@ 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)
Store store = this.GridPanel1.GetStore();

store.DataSource = new List<object>
new {
Name = "Bill Foot",
Email = "bill.foot@object.net"
new {
Name = "Bill Little",
Email = "bill.little@object.net"

<!DOCTYPE html>
<head id="Head1" runat="server">
<title>GridPanel with RowEditor Plugin - Ext.NET Examples</title>
<link href="/resources/css/examples.css" rel="stylesheet" />
<form id="Form1" runat="server">
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<ext:ResourceManager ID="ResourceManager1" runat="server" />
<ext:Store ID="Store1" runat="server">
<ext:Model ID="Model1" runat="server" Name="Employee" IDProperty="name">
<ext:ModelField Name="name" ServerMapping="Name" Type="String" />
<ext:ModelField Name="email" ServerMapping="Email" Type="String" />
<ext:GridPanel ID="GridPanel1" StoreID="Store1" runat="server" Width="600" Height="400"
Frame="true" Title="Employees">
<ext:RowEditing ID="RowEditing1" runat="server" ClicksToMoveEditor="1"
AutoCancel="false" />
<ext:Column ID="Column3" runat="server" Text="User" DataIndex="name" Width="150" >
<ext:TextField ID="TextField1" ItemID="name" runat="server">
<ext:Column ID="Column4" runat="server" Text="Email" Flex="1" DataIndex="email">
<ext:TextField ID="TextField2" runat="server" />
<AfterRender Handler="this.editingPlugin.editor.on('afterrender', function () {
Ext.Array.erase(this.keyNav.map.bindings, 0, 1);
});" Delay="1" />

Jun 21, 2013, 4:59 PM
Hi @tanky65,

Please use:

<AfterRender Handler="this.editingPlugin.getEditor().on('afterrender', function () {
Ext.Array.erase(this.keyNav.map.bindings, 0, 1);
});" Delay="1" />

Jun 22, 2013, 2:19 PM
I confirm that it works, thanks

Sep 29, 2014, 4:43 PM
Thanks! work for me too.