This is a migrated thread and some comments may be shown as answers.

ComboBox to change enable property launches event

1 Answer 61 Views
ComboBox
This is a migrated thread and some comments may be shown as answers.
goku
Top achievements
Rank 1
goku asked on 13 Oct 2010, 07:11 PM

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.

 

1 Answer, 1 is accepted

Sort by
0
goku
Top achievements
Rank 1
answered on 13 Oct 2010, 08:03 PM
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.

Tags
ComboBox
Asked by
goku
Top achievements
Rank 1
Answers by
goku
Top achievements
Rank 1
Share this question
or