How do I deslect all items in a listbox?
I know that the ClearSelected method will deselect the items however in
the displayed list box the first item appears to be selected. Can anyone
explain why this is and provide a solution.
Many Thanks, Richard
My code is as follows (prior to the ClearSelected method the selected
Index is 0 and after it is -1).
this.associatedPrinters.DataSource =
FillDropDown.GetFillDropDown("AssociatedPrinterLis t",ink.Inkid);
this.associatedPrinters.DisplayMember = "PrinterDescription";
this.associatedPrinters.ValueMember = "PrinterId";
Console.WriteLine (this.associatedPrinters.SelectedIndex.ToString()) ;
this.associatedPrinters.ClearSelected();
Console.WriteLine(this.associatedPrinters.Selected Index.ToString());
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!