Results 1 to 14 of 14

Thread: SelectedIndexChanged RESOLVED

Threaded View

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2005
    Posts
    11

    Question SelectedIndexChanged RESOLVED

    Hi

    I have a function "Private Sub fillBoxes(ByVal recordPos As Integer)" which fills several text boxes in the page with the contents of a database table row. RecordPos is the number of the row in the table.

    I can call this function in the pageload with fillBoxes(0), or fillBoxes(4) or whatever and it works fine. However, I am trying to call it from the SelectedIndexChanged event of a DropDownList, like this:

    Private Sub ddlKey_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ddlKey.SelectedIndexChanged
    fillBoxes(ddlKey.SelectedIndex)
    End Sub

    So basically the user selects a value from the list and the textboxes are filled with the corresponding data row. This throws an exception, however, saying "There is no row at position X". There is nothing wrong with the function as it works fine when I call it in the page load.

    Any ideas what could be wrong?

    Thanks
    Joe
    Last edited by joef; May 17th, 2005 at 08:18 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width