Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ComboBox > RadComboBox Different colors for each element

Not answered RadComboBox Different colors for each element

Feed from this thread
  • Alex avatar

    Posted on Jan 26, 2012 (permalink)

    I am working on a RadComboBox that will be used in a Time Tracking program. The drop down box currently is used to display the beginning date for the current week, next week, and the 6 weeks prior. So, for example, today is the 26 January 2012, so it displays 12/12/11, 12/19/11.... and so on. When a week is selected, it displays time information that the employee has entered so far, so that they can submit it and be paid. I need to, in the RadComboBox, display background colors for each item depending on if they have hit their minimum number of hours needed to submit, which is 37.5. The box is initialized using the following code:

            private void BuildWeeksComboBoxData( )
            {
                WeeksToSelect.Clear();

                // Obtain the "Seed" date, which is current date
                // Then add in the previous six weeks, current week, and week after
                DateTime firstDay = GetFirstDayInWeek(DateTime.UtcNow, DayOfWeek.Monday);

                for (int i = 0; i < 8; i++)
                {WeeksToSelect.Add(firstDay.AddDays(7 * (i - 6)));}

                WeekComboBox.ItemsSource = WeeksToSelect;
            }

    Any suggestions on how I can go about accomplishing this?

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / Silverlight > ComboBox > RadComboBox Different colors for each element
Related resources for "RadComboBox Different colors for each element"

Silverlight ComboBox Features  |  Documentation  |  Demos  |  Telerik TV  |  Self-Paced Trainer  ]