get the DataType(checkboxlist) as string or list in my UC
Hello,
I have a question about DataTypes. I want to get the complete checkboxList in my usercontrol, not just the values that are checked in the Node, but I can't seem to find a way how to do it properly.
Just to give you an idea what I'm doing here:
I have a checkboxlist property (services) containing some arbitrairy values. If I want to fetch the ones that are checked in a particular "hotspot", I do something like this:
foreach(string service in splitServices(hotspot.GetProperty("services").Value)) { s.Append("<li class=\"services\">"); s.Append(service); s.Append("</li>"); }
Where "splitServices" is a generic method that transforms the comma separated string.
What I like to do now is get all the services from that datatype and draw them in a list, giving the ones that are checked a different css class. So it should look something like this:
foreach(string service in ServiceList)) { if (service.isContainedBy(splitServices(hotspot.GetProperty("services").Value)) { s.Append("<li class=\"highlighted\">"); } else { s.Append("<li class=\"services\">"); }
s.Append(service); s.Append("</li>"); }
So basically, I need to get this "ServiceList". Any help is greatly appreciated. :)
get the DataType(checkboxlist) as string or list in my UC
Hello,
I have a question about DataTypes. I want to get the complete checkboxList in my usercontrol, not just the values that are checked in the Node, but I can't seem to find a way how to do it properly.
Just to give you an idea what I'm doing here:
I have a checkboxlist property (services) containing some arbitrairy values.
If I want to fetch the ones that are checked in a particular "hotspot", I do something like this:
foreach(string service in splitServices(hotspot.GetProperty("services").Value))
{
s.Append("<li class=\"services\">");
s.Append(service);
s.Append("</li>");
}
Where "splitServices" is a generic method that transforms the comma separated string.
What I like to do now is get all the services from that datatype and draw them in a list, giving the ones that are checked a different css class. So it should look something like this:
foreach(string service in ServiceList))
{
if (service.isContainedBy(splitServices(hotspot.GetProperty("services").Value))
{
s.Append("<li class=\"highlighted\">");
} else { s.Append("<li class=\"services\">"); }
s.Append(service);
s.Append("</li>");
}
So basically, I need to get this "ServiceList".
Any help is greatly appreciated. :)
is working on a reply...