ComboBox to change enable property launches event

2 posts, 0 answers
  1. goku
    goku avatar
    2 posts
    Member since:
    May 2008

    Posted 13 Oct 2010 Link to this post

    Hi everyone.

    This is the code

    aspx

     

    <

     

    telerik:RadComboBox ID="rcmbPrioridad"

     

     

                                        runat="server"

     

     

                                        Skin="Mac"

     

     

                                        AutoPostBack="true"

     

     

     

                                        EmptyMessage=" -Seleccione prioridad- "

     

     

     

                                        MarkFirstMatch="True"

     

     

                                        TabIndex="1"

     

     

     

                                        Width="99%"

     

     

     

                                        ToolTip="Prioridad de pago">

     

     

     

         <Items>

     

     

     

             <telerik:RadComboBoxItem Value="0" Text="" />

     

     

     

             <telerik:RadComboBoxItem Value="1" Text="Normal" />

     

     

     

             <telerik:RadComboBoxItem Value="2" Text="Pago programado" />

     

     

     

             <telerik:RadComboBoxItem Value="3" Text="En espera" />

     

     

     

         </Items>

     

     

     

         <CollapseAnimation Type="OutQuint" Duration="200"></CollapseAnimation>

     

     

     

     </telerik:RadComboBox>

     

     

     

    <telerik:RadComboBox ID="rcmbTipoPeriodo"

     

     

                                         runat="server"

     

     

                                        AutoPostBack="true"

     

     

                                        Skin="Mac"

     

     

                                        Width="99%"

     

     

     

                                        Height="230px">

     

     

     

        <CollapseAnimation Type="OutQuint" Duration="200" />

     

     

     

    </telerik:RadComboBox>

    vb
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        If Not Page.IsPostBack Then

     

            Call pcHabilitaCtrlRegistro(False)
        End If

     

     

    End Sub

     

    Protected

     

    Sub rcmbPrioridad_SelectedIndexChanged(ByVal o As Object, ByVal e As Telerik.Web.UI.RadComboBoxSelectedIndexChangedEventArgs) Handles rcmbPrioridad.SelectedIndexChanged

        do something....

     

     

    End Sub

     

    Private

     

    Sub pcHabilitaCtrlRegistro(ByVal bolCtrlLlave As System.Boolean

     

     

        rcmbTipoPeriodo.Enabled = bolCtrlLlave
    End Sub

    The problem is when I change te seleccion of  "rcmbPrioridad" control the code does the following
    1- Page_Load event    (Its correct)
    2- rcmbPrioridad_SelectedIndexChanged    (Its correct)
    3- rcmbTipoPeriodo_TextChanged   (Thast the problem)

    Why enter to 3 step if any control change text property of rcmbTipoPeriodo

    Thank so much.
    Jose Luis.

     

  2. goku
    goku avatar
    2 posts
    Member since:
    May 2008

    Posted 13 Oct 2010 Link to this post

    I found the answer

    <

     

    telerik:RadComboBox ID="rcmbNumeroPeriodo"

     

     

    runat="server"

     

     

    AutoPostBack="true"

     

     

    Skin="Mac"

     

     

    MarkFirstMatch="true"

     

     

    Width="100%"

     

     

    Height="230px"

     

     

    EmptyMessage=" -No Periodo-"

     

     

    ToolTip="Numero de periodo">

     

     

    <Items>

     

     

    <telerik:RadComboBoxItem Text="" Value="1" />

     

     

    </Items>

     

     

    </telerik:RadComboBox>

    Only add this section

     

    <Items>

     

     

     

     

     

    <telerik:RadComboBoxItem Text="" Value="1" />

     

     

     

     

     

    </Items>



    I dont know why.. but it's true.

    Tanks.

Back to Top