I create Enum
Public Enum TipoDelega IntestataBanca = 1 IntestataConcessionario = 2End Enum
then i create an ultraoptionset with designer
Me.UltraOptionSet2 = New Infragistics.Win.UltraWinEditors.UltraOptionSet
then i go in the new function on the form from and write
Dim ValueListItem4 As Infragistics.Win.ValueListItem = New Infragistics.Win.ValueListItemDim ValueListItem5 As Infragistics.Win.ValueListItem = New Infragistics.Win.ValueListItem ValueListItem4.DataValue = BL.Utility.TipoDelega.IntestataBancaValueListItem5.DataValue = BL.Utility.TipoDelega.IntestataConcessionario ValueListItem4.DisplayText = "Banca"ValueListItem5.DisplayText = "C&oncessionario" Me.UltraOptionSet2.Items.AddRange(New Infragistics.Win.ValueListItem() {ValueListItem4, ValueListItem5})
When start the project i don't see ultraoptionset as I hoped... with the first value selected
Why?
thank you
Hi,
I don't see anything in the code you posted here that sets the selected item. If you want the OptionSet to have an option selected, you need to set the SelectedIndex or the Value of the control.