Windows Vista Forums

Has a SelectedValue which is invalid because it does not exist
  1. #1


    Mahesh Nimbalkar Guest

    Has a SelectedValue which is invalid because it does not exist

    On my page, I have ObjectDataSource and ListView. In Oninit method, I am
    setting selected value of Listbox.

    In above scenario, it throws error if I set SelectedValue property of
    ListBox and if that item does not exist in ListBox collection.

    "has a SelectedValue which is invalid because it does not exist "

    I want to suppress this error if that item to be have selected does not
    exist in collection.

    I am thinking to hook DataBinding or Selected event of ObjectDataSource and
    suppress error in that event. Could you please give example of those events
    in this context?

    --
    Thanks,
    Mahesh




      My System SpecsSystem Spec

  2. #2


    Fcorod Guest

    RE: Has a SelectedValue which is invalid because it does not exist



    "Mahesh Nimbalkar" wrote:

    > On my page, I have ObjectDataSource and ListView. In Oninit method, I am
    > setting selected value of Listbox.
    >
    > In above scenario, it throws error if I set SelectedValue property of
    > ListBox and if that item does not exist in ListBox collection.
    >
    > "has a SelectedValue which is invalid because it does not exist "
    >
    > I want to suppress this error if that item to be have selected does not
    > exist in collection.
    >
    > I am thinking to hook DataBinding or Selected event of ObjectDataSource and
    > suppress error in that event. Could you please give example of those events
    > in this context?
    >
    > --
    > Thanks,
    > Mahesh
    >

      My System SpecsSystem Spec

Has a SelectedValue which is invalid because it does not exist problems?

Similar Threads
Thread Thread Starter Forum Replies Last Post
"invalid STORE command syntax invalid message set syntax" Catullus Nacakus Vista mail 6 26 Jan 2008
Bug: ItemsControl SelectedValue Binding Fails JasonMueller Avalon 0 15 Dec 2007
Re: Does this exist? rothschild86 Live Mail 2 12 Nov 2007
DNS Name does not exist Bill Vista account administration 1 07 Dec 2006
OE7 Do You Exist? Grumpy Vista General 3 03 Jun 2006