DropDownField value always NULL

  1. #1

    DropDownField value always NULL

    Latest ExtNet 2.4 WebForms from website
    .NET 4.5

    The value of the DropDownField is always null when I changed the value and pushed the save button.

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="ExtNetTest.Default" %>
    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <form runat="server">
            <ext:ResourceManager runat="server" />
            <ext:Viewport runat="server" Layout="FormLayout">
                    <ext:DropDownField runat="server" ID="ddfColor">
                            <ext:Panel runat="server">
                                    <ext:ColorPicker runat="server" StyleSpec="background-image: none;">
                                            <select Handler="var ddf = this.up('panel').dropDownField; ddf.setValue(color); ddf.value = color;" />
                    <ext:Button runat="server" ID="btnSave" Text="Save">
                            <Click OnEvent="SaveClick">
                                <EventMask ShowMask="True" Msg="Saving..." />
    using System;
    using System.Web.UI;
    using Ext.Net;
    namespace ExtNetTest
        public partial class Default : Page
            protected void Page_Load(object sender, EventArgs e)
            protected void SaveClick(object sender, DirectEventArgs e)
                var value = ddfColor.Value;
    Last edited by mturnhout; Jan 14, 2014 at 2:17 PM.
  2. #2
    Please use Text instead Value
  3. #3
    Quote Originally Posted by Vladimir View Post
    Please use Text instead Value

    Made something for which I used "Field" which doesn't have "Text" but got it working with:
    var value = control is TextFieldBase ? ((TextFieldBase)control).Text : control.Value;
    Is there a reason why "DropDownField" doesn't use "Value" and "Hidden", "TextField", "ComboBox", ... do?

Similar Threads

  1. Replies: 1
    Last Post: Nov 07, 2013, 2:40 PM
  2. dropdownfield
    By oet7i in forum 2.x Help
    Replies: 3
    Last Post: Jan 24, 2013, 9:54 PM
  3. Replies: 0
    Last Post: Jan 22, 2013, 2:50 PM
  4. Replies: 0
    Last Post: Dec 01, 2011, 6:43 AM
  5. Replies: 1
    Last Post: Jun 08, 2010, 11:38 AM

Tags for this Thread

Posting Permissions