DropDown event doesn't trigger

Discussion in 'ASP .Net' started by John Smith, Jun 6, 2006.

  1. John Smith

    John Smith Guest

    I have DropDownList inside DataGrid:

    <asp:datagrid id="DataGrid1" runat="server" AutoGenerateColumns="False">
    <Columns>
    <asp:BoundColumn Visible="False" DataField="id" ReadOnly="True"
    HeaderText="ID"></asp:BoundColumn>
    <asp:TemplateColumn HeaderText="O">
    <ItemTemplate>
    <asp:DropDownList id="cmbObdelaj" runat="server" AutoPostBack=True
    OnSelectedIndexChanged="DropDown_SelectedIndexChanged">
    <asp:ListItem Value="P">PPPPP</asp:ListItem>
    <asp:ListItem Value="D">DDDD</asp:ListItem>
    </asp:DropDownList>
    </ItemTemplate>
    </asp:TemplateColumn>
    </asp:datagrid>

    As you can see, DropDownList have associated OnSelectedIndexChanged event,
    which never triggers. :( Why?
    John Smith, Jun 6, 2006
    #1
    1. Advertising

  2. John Smith

    John Smith Guest

    This is sub's body:

    Public Sub DropDown_SelectedIndexChanged(ByVal sender As System.Object,
    ByVal e As System.EventArgs)
    Convert.ToInt32("SSSS")
    End Sub
    John Smith, Jun 6, 2006
    #2
    1. Advertising

  3. John Smith

    John Smith Guest

    It works fine now. I had some strange code in PageLoad() event.
    John Smith, Jun 6, 2006
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John A Grandy
    Replies:
    0
    Views:
    452
    John A Grandy
    Sep 21, 2006
  2. Anthony Bollinger

    Dropdown to Trigger Custom Query from Database

    Anthony Bollinger, Oct 3, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    289
    Anthony Bollinger
    Oct 3, 2006
  3. Morgan Cheng
    Replies:
    3
    Views:
    1,708
    John Timney \(MVP\)
    Apr 30, 2007
  4. mldardy
    Replies:
    1
    Views:
    745
    mldardy
    Dec 10, 2008
  5. Anthony Papillion

    TkInter bind() event is not firing event trigger

    Anthony Papillion, Jun 23, 2010, in forum: Python
    Replies:
    3
    Views:
    1,660
    rantingrick
    Jun 23, 2010
Loading...

Share This Page