[CLOSED] Validation

  1. #1

    [CLOSED] Validation

    I have a grid with a combo editor and a RowEditing plugin. The combo allows type-ahead. Now I am trying to validate my entry. When I just type in some letters and tab without actually selecting anything from the drop-down, the new value is that text, and not the value associated in the store (which, since it doesn't exist should be null or 0 - I would think). Also, because I am in a grid and using an "Add" button, I have inserted to the grid and have to use a cancel edit function to remove that insert if the row editor is cancelled. So, my question is how do I validate my combo and stop any other eventes without raising the cancel event on my RowEditing plug-in?
    Last edited by Daniil; Jun 20, 2012 at 11:04 AM. Reason: [CLOSED]
  2. #2

    I would try to use the ComboBox Validator.

    <%@ Page Language="C#" %>
    <%@ 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.ComboBox1.GetStore();
                store.DataSource = new object[] 
                    new object[] { "1", "item1" },
                    new object[] { "2", "item2" },
                    new object[] { "3", "item3" }
    <head runat="server">
        <title>Ext.NET v2 Example</title>
        <script type="text/javascript">
            var myValidator = function (value) {
                var valid = true;
                if (value !== "item2") {
                    valid = "Must be 'item2'";
                return valid;
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:ComboBox ID="ComboBox1" runat="server">
                <Validator Fn="myValidator" />
                    <ext:Store runat="server">
                            <ext:Model runat="server">
                                    <ext:ModelField Name="value" />
                                    <ext:ModelField Name="text" />
                            <ext:ArrayReader />

Similar Threads

  1. Client Side Validation and Validation Status
    By speddi in forum 1.x Help
    Replies: 8
    Last Post: Nov 03, 2011, 11:24 AM
  2. Replies: 3
    Last Post: Jul 11, 2011, 9:43 AM
  3. [CLOSED] Validation
    By pdcase in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Sep 06, 2010, 8:23 PM
  4. [CLOSED] validation
    By speedstepmem4 in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 09, 2009, 10:00 AM
  5. [CLOSED] validation
    By speedstepmem3 in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Jan 15, 2009, 8:53 AM

Tags for this Thread

Posting Permissions