Another day, another question ;)
So, I have two custom Lists, "Attendees" and "Events". In the Events-List there's a Lookupfield "Registrations" which I want to fill programmatically on page_load. In the Events List there's a Lookupfield "Event".
First of all: I know this can be done via UI of SharePoint, and to be honest I just implemented it like this at the moment. But what I really want to achieve is the following:
In the Events-List there are two more columns, lets call them "minimal attendees" and "maximal attendees".
So now I don't just want to show the number in the "Registrations"-Column for an event, I want to show it like this: "1 of 15", ideally via SPHttpEncode in different colors (something like "orange" if registrations < min. Attendees, green if >= min. attendees and < max. attendees and red if registrations == count_related)
Now I don't know how to get the count-related value programmatically (using c#) and hope you could help :)
Best regards, Dominik