I'm using nuPicker Property Editor to create a CheckBoxList property from an EnumDataSource. Installed the plugin using NuGet. I need an extra attribute for this data source like "Url". How can I add an attribute considering the code is running from a DLL source?
This is the generated source file for the EnumDataSourceAttribute class that cannot be modified:
#region Assembly uComponents.nuPickers.dll, v1.2.1.0
#endregion
using System;
namespace nuPickers.Shared.EnumDataSource
{
public class EnumDataSourceAttribute : Attribute
{
public EnumDataSourceAttribute();
public bool Enabled { get; set; }
public string Key { get; set; }
public string Label { get; set; }
}
}
The EnumDataSource attribute only supports a Key, Label and an Enabled flag, but could you create a custom attribute for the url property eg. EnumUrlAttribute ?
I need a CheckBoxList Property in BO to select specific options to current page. Every option should have associated values like title (label value), id (key) and Iconurl, so I could use them in a foreach to render with markup in View based on what option is checked.
It would be nice to get the values from attributes applied to enums. So if Option1 is checked in BO, I get the key, Url and label attributes values from Option1? How?
nuPickers: Add attributes to EnumDataSource
Hi,
I'm using nuPicker Property Editor to create a CheckBoxList property from an EnumDataSource. Installed the plugin using NuGet. I need an extra attribute for this data source like "Url". How can I add an attribute considering the code is running from a DLL source?
This is the generated source file for the EnumDataSourceAttribute class that cannot be modified:
This is my enum:
I need an extra attribute like:
How can I do this?
Dan
Hi Dan,
The EnumDataSource attribute only supports a Key, Label and an Enabled flag, but could you create a custom attribute for the url property eg. EnumUrlAttribute ?
Where do you need to use the Url property ?
I did have a helper method to get values out of attributes applied to an enum - I can dig this out if it's of any use ?
Hendy
Hi Hendy,
I need a CheckBoxList Property in BO to select specific options to current page. Every option should have associated values like title (label value), id (key) and Iconurl, so I could use them in a foreach to render with markup in View based on what option is checked. It would be nice to get the values from attributes applied to enums. So if Option1 is checked in BO, I get the key, Url and label attributes values from Option1? How?
Thanks,
Dan
is working on a reply...