or
Can I use more than one column as a DataKeyField( like how we can use more than one column as a DataKeyNames for the gridview)?
I need to show each appointment in a different color based on the appointment status. This appoint status is one of the column in the datatable.
I am thinking to change the background color of the appointment from the RadScheduler1_AppointmentDataBound event based on the staus using CSS.
| { |
| int startYear = 2003; |
| DateTimeFormatInfo dtfi = new DateTimeFormatInfo(); |
| RadComboBoxItem riMs = new RadComboBoxItem(); |
| riMs.Text = "Month"; |
| riMs.Value = "Month"; |
| RadComboBoxItem riMe = new RadComboBoxItem(); |
| riMe.Text = "Month"; |
| riMe.Value = "Month"; |
| RadStartMonth.Items.Add(riMs); |
| RadEndMonth.Items.Add(riMe); |
| for (int month = 1; month < 13; month++) |
| { |
| RadComboBoxItem ris = new RadComboBoxItem(); |
| ris.Text = dtfi.GetMonthName(month); |
| ris.Value = dtfi.GetMonthName(month); |
| RadStartMonth.Items.Add(ris); |
| RadComboBoxItem rie = new RadComboBoxItem(); |
| rie.Text = dtfi.GetMonthName(month); |
| rie.Value = dtfi.GetMonthName(month); |
| RadEndMonth.Items.Add(rie); |
| } |
| RadComboBoxItem riYs = new RadComboBoxItem(); |
| riYs.Text = "Year"; |
| riYs.Value = "Year"; |
| RadStartYear.Items.Add(riYs); |
| RadComboBoxItem riYe = new RadComboBoxItem(); |
| riYe.Text = "Year"; |
| riYe.Value = "Year"; |
| RadEndYear.Items.Add(riYe); |
| for (int year = startYear; year <= DateTime.Now.Year + 1; year++) |
| { |
| RadComboBoxItem riYYs = new RadComboBoxItem(); |
| riYYs.Text = year.ToString(); |
| riYYs.Value = year.ToString(); |
| RadStartYear.Items.Add(riYYs); |
| RadComboBoxItem riYYe = new RadComboBoxItem(); |
| riYYe.Text = year.ToString(); |
| riYYe.Value = year.ToString(); |
| RadEndYear.Items.Add(riYYe); |
| } |
| } |
