Jan 14, 2014, 2:03 PM
DropDownField value always NULL
Latest ExtNet 2.4 WebForms from website
.NET 4.5
VS2012
IE11
The value of the DropDownField is always null when I changed the value and pushed the save button.
.NET 4.5
VS2012
IE11
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">
<title></title>
</head>
<body>
<form runat="server">
<ext:ResourceManager runat="server" />
<ext:Viewport runat="server" Layout="FormLayout">
<Items>
<ext:DropDownField runat="server" ID="ddfColor">
<Component>
<ext:Panel runat="server">
<Items>
<ext:ColorPicker runat="server" StyleSpec="background-image: none;">
<Listeners>
<select Handler="var ddf = this.up('panel').dropDownField; ddf.setValue(color); ddf.value = color;" />
</Listeners>
</ext:ColorPicker>
</Items>
</ext:Panel>
</Component>
</ext:DropDownField>
<ext:Button runat="server" ID="btnSave" Text="Save">
<DirectEvents>
<Click OnEvent="SaveClick">
<EventMask ShowMask="True" Msg="Saving..." />
</Click>
</DirectEvents>
</ext:Button>
</Items>
</ext:Viewport>
</form>
</body>
</html>
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.