in

C1 Community

ComponentOne Community is a free source for developers and help authors to collaborate and communicate.

Change Label Color

Last post 05-04-2008 3:04 PM by jmantheiy. 2 replies.
Page 1 of 1 (3 items)
Sort Posts: Previous Next
  • 04-25-2008 9:45 AM

    Change Label Color

    I am not using Labels as is defined in Scheduler, but rather using Rooms as the labels. The ID value of the Room is an integer value. In the Appointments table, we don't have a Properties field, which looks like that is what is used to store the references. I have mapped the category information as below

    In my appointments, I generate  string of what looks similar to the properties field in the sample.

    <c1:NestedPropertySetter
      PropertyName="DataStorage.AppointmentStorage.Mappings.AppointmentProperties.MappingName"
      Value="EventProperties"/>

    <c1:NestedPropertySetter
      PropertyName="DataStorage.LabelStorage.DataMember"
      Value="Rooms"/>
    <
    c1:NestedPropertySetter
      PropertyName="DataStorage.LabelStorage.DataSource"
      Value="{StaticResource RoomsDS}"/>
    <
    c1:NestedPropertySetter
      PropertyName="DataStorage.LabelStorage.Mappings.IdMapping.MappingName"
      Value="ID"/>
    <
    c1:NestedPropertySetter
      PropertyName="DataStorage.LabelStorage.Mappings.ColorMapping.MappingName"
      Value="ColorCode"/>
    <
    c1:NestedPropertySetter
      PropertyName="DataStorage.LabelStorage.Mappings.TextMapping.MappingName"
      Value="Name"/>

     1. Is it possible to link to a field that is an integer?
     2. What specifically is the Appointment Mapping looking for?

    Filed under:
  • 04-28-2008 6:45 AM In reply to

    Re: Change Label Color

    > 1. Is it possible to link to a field that is an integer?
    Sure. Use IndexMapping for your ID field instead of IdMapping (you should use IdMapping if
    your key is Guid, or IndexMapping if your key is integer).

    > 2. What specifically is the Appointment Mapping looking for?
    Information about Appointment labels is saved to field which is mapped to
    DataStorage.AppointmentStorage.Mappings.AppointmentProperties. I.e. in your sample, it is
    EventProperties field of your DataTable. If you don't have such field in your DataSource,
    you shouldn't set mapping for it. In such case you should manually save/load information
    about appointment labels somewhere in your code.
  • 05-04-2008 3:04 PM In reply to

    Re: Change Label Color

    I don't have this field defined in the database. I was trying to generate it in code, but not having any luck? Not sure what it is really looking for. The only reason I care is because i need to change the background color to the color of the room.

Page 1 of 1 (3 items)
Contact ComponentOne: 1.800.858.2739 ©1987-2008 ComponentOne LLC All Rights Reserved.