Results 1 to 5 of 5

Thread: [RESOLVED]databinding dropdown problem

Threaded View

  1. #1

    Thread Starter
    Fanatic Member davebat's Avatar
    Join Date
    Dec 2002
    Posts
    727

    [RESOLVED]databinding dropdown problem

    I have a dropdown that is populated through a stored procedire triggered from the chnage of a different drop down.

    I am getting the message

    Specified argument was out of the range of valid values.
    Parameter name: value

    does any know what this means so i can start to investigate, I cannot get debug working so I dont knwo where to start looking

    -----------------------------------------------

    I Have changed code too:

    Code:
    ddSectorName.SelectedIndex = 0
    
    ddSectorName.DataSource = dsSectorName
    ddSectorName.DataTextField = "SECT_NM"
    ddSectorName.DataValueField = "SECT_ID"
    ddSectorName.DataBind()
    
    ddSectorName.Items.Insert(0, "All")
    ddSectorName.Items(0).Value = "%"
    
    ddSectorName.SelectedIndex = 0
    it seems that the dropdown was stroing the indexnumber for the currently selected item in viewstate, and when databinding if the new list of items was not as big as the previous then it couldnt find the index and it would fall over.
    Last edited by davebat; Mar 10th, 2005 at 05:34 AM. Reason: [RESOLVED]

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