RE: ListBox.SelectionMode = SelectionMode.None
- From: Morten Wennevik [C# MVP] <MortenWennevik@xxxxxxxxxxx>
- Date: Tue, 12 Aug 2008 22:21:22 -0700
"John A Grandy" wrote:
Apparently with ListBox.SelectionMode = SelectionMode.None it is not
possible to data-bind the control programmatically ?
When setting SelectionMode.None, you effectively remove the Selected#
properties so you can't use those properties anymore, including DataBinding
against them. You can still simulate selected items by using a BindingSource
and setting the BindingSource.Position property though, so if you allow
selection for only a few people you can update this property in a
ListBox.SelectedIndexChanged event.
--
Happy Coding!
Morten Wennevik [C# MVP]
.
- References:
- ListBox.SelectionMode = SelectionMode.None
- From: John A Grandy
- ListBox.SelectionMode = SelectionMode.None
- Prev by Date: ListBox.SelectionMode = SelectionMode.None
- Next by Date: AxWebBrowser and C#
- Previous by thread: ListBox.SelectionMode = SelectionMode.None
- Next by thread: AxWebBrowser and C#
- Index(es):
Loading