[CLOSED] Change IndicatorIconCls dynamically not works

  1. #1

    [CLOSED] Change IndicatorIconCls dynamically not works

    Hi,
    See my example, I need to change the indicator icon class dynamically, but I don't succeed.
    Please help me
    Thank you

    <%@ Page Language="C#" %>
    
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    
    <!DOCTYPE html>
    
    
    <script runat="server">
    protected void Page_Load(object sender, EventArgs e)
    {
      txtF.IndicatorIconCls = "iconHelpRed";
    }
    </script>
    
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title></title>
      <style>
    
    
        .iconHelpRed {
            background-image: url(../Images/help-red.png);
          }
      </style>
    
    
      
    </head>
    <body>
        <form id="form1" runat="server">
          <ext:ResourceManager runat="server" />
    
    
          <ext:TextField  id="txtF" runat="server" Width="300" IndicatorIcon="BulletRed" />
    
    
        </form>
    </body>
    </html>
    Attached Images  
    Last edited by Daniil; Jun 24, 2014 at 7:45 AM. Reason: [CLOSED]
  2. #2
    Hi Jimmy,

    The IndicatorIcon and IndicatorIconCls properties are not supposed to be used together.

    You can do:
    protected void Page_Load(object sender, EventArgs e)
    {
      txtF.IndicatorIconCls = "iconHelpRed";
      txtF.IndicatorIcon = Icon.None; // in this case it won't be rendered to client
    }
    Or remove IndicatorIcon in the markup and set it in code behind as well at a certain condition.
  3. #3
    Hi Daniil,
    It works fine.
    Thank you very much.

    Jimmy

Similar Threads

  1. [CLOSED] How to dynamically change the url of combobox store
    By Daly_AF in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Jan 16, 2013, 4:41 PM
  2. [CLOSED] Dynamically change CommandColumn properties
    By digitek in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 13, 2012, 1:50 PM
  3. Replies: 24
    Last Post: Aug 06, 2012, 11:26 AM
  4. [CLOSED] Change Tab Name dynamically in Tab Control
    By Etisbew in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Jun 19, 2009, 2:45 AM
  5. [CLOSED] Change Themes Dynamically
    By Zarzand in forum 1.x Legacy Premium Help
    Replies: 4
    Last Post: Nov 28, 2008, 6:13 PM

Posting Permissions