selected Value become empty in combobox

  1. #1

    selected Value become empty in combobox

    Hi

    Issue : After selecting the value in combobox value is becoming emplty

    Expected Output : Value should retain after selection of Red or Green or Yellow

    Can any one please tell me how to fix this issue.....Below is the code for it

    <%@ Page Language="C#" %>

    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>

    <script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    </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>Ext.Net Example</title>
    </head>
    <body>
    <form id="Form1" runat="server" style="padding:10px">
    <ext:ResourceManager ID="ResourceManager1" runat="server" />

    <ext:ComboBox ID="ComboBox11" runat="server" >
    <Items>
    <ext:ListItem Text="Green" Value="0" />
    <ext:ListItem Text="Yellow" Value="1" />
    <ext:ListItem Text="Red" Value="2" />
    </Items>
    <Template runat="server">
    <Html>
    <tpl for=".">
    <h1 style="color:{[values.value == 0 ? 'red' : values.value == 1 ? 'green' : values.value == 2 ? 'blue' : 'black']}">{text}</h1>
    </tpl>
    </Html>
    </Template>
    </ext:ComboBox>
    </form>
    </body>
    </html>

    Regards
    Praveen
    Last edited by praveencat123; May 31, 2013 at 1:37 PM. Reason: Typo error
  2. #2
    Quote Originally Posted by praveencat123 View Post

    Issue : After selecting the value in combobox value is becoming emplty

    .....
    Hi there, as shown here https://examples1.ext.net/#/Form/Com...rop_Down_List/
    seems like you must specify a valid ItemSelector for your template.

    Good luck

Similar Threads

  1. ComboBox selected item
    By rookie in forum 1.x Help
    Replies: 0
    Last Post: Dec 15, 2012, 5:25 PM
  2. combobox: value selected instead of text
    By Birgit in forum 2.x Help
    Replies: 2
    Last Post: Nov 21, 2012, 8:42 AM
  3. Replies: 4
    Last Post: Sep 28, 2011, 8:57 AM
  4. Get selected value from combobox
    By lion142 in forum 1.x Help
    Replies: 0
    Last Post: Mar 04, 2011, 12:21 AM
  5. How to get the value selected from a comboBox?
    By flormariafr in forum 1.x Help
    Replies: 2
    Last Post: Jan 23, 2010, 3:49 PM

Tags for this Thread

Posting Permissions