Cannot call this method when SelectionMode is SelectionMode.NONE.
  • i am trying to select item in listbox from code behind but its throwing error 
    Cannot call this method when SelectionMode is SelectionMode.NONE.

    i am using this code
    listBox1.SetSelected(0, true);
  • 1 Comment sorted by
  • use this

    this.listBox1.SelectionMode = SelectionMode.One;

    or this

    this.listBox1.SelectionMode = SelectionMode.MultiSimple;

Howdy, Stranger!

It looks like you're new here. If you want to get involved, or you want to Ask a new Question, Please Login or Create a new Account by Clicking below

Login with Facebook

Popular Posts of the Week

    Optimum Creative