[CONNECT C#] How to apply pick lists to other data types than strings

I sucessfully managed to create and apply PickLists to the properties in my Item Types. Really useful!

My problem is that PickList values are strings and I get a data converison error if I try to use the PickList on anything else than string properties. Perhaps I should use the 

PickListValueChangedEventHandler but I cannot figure out how this is done. The documentation is as always quite limited.
Regards,
Krister
Parents
  • Try to adding event interest like:

    PickListHandler.PickListValueChanged += OnPickListValueChanged;

    And event handler like to inspect or refresh the control if needed:

    private void OnPickListValueChanged(object sender)
        {
        bool modified = false;
        ...
        modified = PickListHandler.ModifyInstance(instance);
        ...
        if (modified)
           //e.g. RefreshControl_IfNeeded();
        }

    HTH,
    Bob



Reply
  • Try to adding event interest like:

    PickListHandler.PickListValueChanged += OnPickListValueChanged;

    And event handler like to inspect or refresh the control if needed:

    private void OnPickListValueChanged(object sender)
        {
        bool modified = false;
        ...
        modified = PickListHandler.ModifyInstance(instance);
        ...
        if (modified)
           //e.g. RefreshControl_IfNeeded();
        }

    HTH,
    Bob



Children