Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
275
UltraOptionSet Bind to Enum - Why i don't see default value checked
posted

I create Enum

 

Public Enum TipoDelega
    IntestataBanca = 1
    IntestataConcessionario = 2
End 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.ValueListItem
Dim ValueListItem5 As Infragistics.Win.ValueListItem = New Infragistics.Win.ValueListItem            ValueListItem4.DataValue = BL.Utility.TipoDelega.IntestataBanca
ValueListItem5.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

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    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.

Children
No Data