How to remove error message as popup in Editable grid

  1. #1

    How to remove error message as popup in Editable grid

    HI All

    i have a grid with editable columns , for one of the column (its a number field) when the user try to enter negative number, as soon as he give negative number symbol (-) then error message is displaying as popup

    Is there any way to suppress the error message as popup and need to display border color as Red for the editable column

    Please find the code with screen short, Expected output is shown in Screenshot

    <%@ Page Language="C#" AutoEventWireup="true" %>
    
    <%@ Import Namespace="System.Xml" %>
    <%@ Import Namespace="System.Collections.Generic" %>
    <%@ Import Namespace="System.Data.SqlClient" %>
    <%@ Import Namespace="System.Data" %>
    <%@ Import Namespace="Ext.Net" %>
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <script runat="server"> 
    
       
    
        protected void Page_Load(object sender, EventArgs e)
        {
    
            if (!X.IsAjaxRequest)
            {
                DataTable dt = CustomColumns();
    
                storeEditMetrics.DataSource = dt;
                storeEditMetrics.DataBind();
            }
    
    
        }
    
        internal static DataTable CustomColumns()
        {
            System.Data.DataTable table1 = new System.Data.DataTable(); 
             
             
            table1.Columns.Add("Header1", typeof(string));
            table1.Columns.Add("Header2", typeof(string));
            table1.Columns.Add("Header3", typeof(string));
            table1.Columns.Add("Header4", typeof(string)); 
    
    
    
            for (int i = 0; i < 8; i++)
            {
                DataRow dr = table1.NewRow(); 
                 
                dr["Header1"] = "Header1 " + i.ToString();
                dr["Header2"] = "ks ";
                dr["Header3"] = i.ToString();
                dr["Header4"] = i.ToString();
                 
    
                table1.Rows.Add(dr);
            }
            return table1;
        }
    </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>Submit MultiSelect Values - Ext.NET Examples</title>  
    </head>
    <body>
        <form id="Form1" runat="server">
            <ext:ResourceManager ID="ResourceManager1" runat="server" Namespace="" />
            <ext:GridPanel ID="grdPnlEditMetrics" runat="server" EnableColumnHide="false" EnableColumnMove="false" ButtonAlign="Center"
                Border="true" DisabledCls="DisabledPanelCss" Height="300" Width="490" AutoScroll="true" EnableColumnResize="false" Namespace="app"
                EmptyText="<%$ Resources:WebResource,GeneralMsg_NoRecordsFound %>">
                <Store>
                    <ext:Store ID="storeEditMetrics" runat="server">
                        <Model>
                            <ext:Model ID="Model3" runat="server">
                                <Fields> 
                                    <ext:ModelField Name="Header1" Type="Auto" />
                                    <ext:ModelField Name="Header2" Type="Auto" />
                                    <ext:ModelField Name="Header3" Type="Auto" />
                                    <ext:ModelField Name="Header4" Type="Auto" /> 
                                </Fields>
                            </ext:Model>
                        </Model>
                    </ext:Store>
                </Store>
                <View>
                    <ext:GridView ID="grdViewMetrics" runat="server" TrackOver="false" StripeRows="false" MarkDirty="false" />
                </View>
                <Plugins>
                <ext:RowEditing ID="rEditorEditMetrics" runat="server" ClicksToMoveEditor="1">
                     
                </ext:RowEditing>
            </Plugins>
                <ColumnModel>
                    <Columns>
                        <ext:Column runat="server" ID="Header1" Text="Metric Name" DataIndex="Header1" Width="200"
                            Sortable="false" Resizable="false" Height="22">
                        </ext:Column>
    
                        <ext:Column runat="server" ID="grdPnlEditMetrics_Header2" Text="Unit" DataIndex="Header2" Width="70" Sortable="false"
                            Resizable="false">
                        </ext:Column>
    
                        <ext:NumberColumn runat="server" ID="nbrHeader4Id" Text="Header4" DataIndex="Header4" Format="00.0" Width="100" Sortable="false"
                            Align="Right" Resizable="false">
                            <Editor>
                                <ext:NumberField ID="nbrHeader4" HideTrigger="true" SpinDownEnabled="false" SpinUpEnabled="false"
                                    runat="server" MaxLength="9" DecimalPrecision="1" AllowBlank="true" ValidateBlank="false" > 
                                </ext:NumberField>
                            </Editor>
                        </ext:NumberColumn>
    
                        <ext:NumberColumn runat="server" ID="nbrHeader3Id" Text="Header3" DataIndex="Header3" Format="00.0" Width="100" Sortable="false"
                            Align="Right" Resizable="false">
                            <Editor>
                                <ext:NumberField ID="nbrHeader3" HideTrigger="true" SpinDownEnabled="false" SpinUpEnabled="false"
                                    runat="server" MaxLength="9" DecimalPrecision="1" AllowBlank="true" ValidateBlank="false">
                                </ext:NumberField>
                            </Editor>
                        </ext:NumberColumn>
                    </Columns>
                </ColumnModel>
            </ext:GridPanel>
        </form>
    </body>
    </html>

    REgards
    PRaveen
    Attached Thumbnails Image.jpg  
  2. #2
    This related discussion should help:

    http://forums.ext.net/showthread.php...ll=1#post33315


    Hope it helps.

Similar Threads

  1. Replies: 14
    Last Post: Nov 28, 2012, 1:03 PM
  2. Replies: 12
    Last Post: Sep 07, 2012, 3:42 PM
  3. Replies: 2
    Last Post: Jun 06, 2012, 9:27 PM
  4. Replies: 5
    Last Post: Jan 05, 2012, 5:25 PM
  5. [CLOSED] How to remove the cursor from non-editable comboboxes
    By jmcantrell in forum 1.x Premium Help
    Replies: 3
    Last Post: Dec 23, 2011, 2:40 PM

Tags for this Thread

Posting Permissions