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
410
Displaying a value list for an enumerated property of a bound object ??
posted

I have a class derived from BindingList<type> that is bound to the grid...

One of the properties of the <type> is AddressType....which is an enum...Physical, Billing, Residential, Mailing etc

How can I make the cells that show theAddressType display a value list (drop down)...showing the available choices such as Physical, Billing etc

Parents
  • 17259
    Offline posted

    var list = ultraGrid1.DisplayLayout.ValueLists.Add();

    foreach (var item in Enum.GetValues(typeof(yourEnumType)))

    {

    list.ValueListItems.Add(item);

    }

    ultraGrid1.DisplayLayout.Bands[0].Columns[yourColumnNameOrIndex].ValueList = list;

Reply Children