List<SelectedCourse> lstSelectedCourses =
this
.SelectedCourses;
//Bind the GridView schedule
gvSchedule.DataSource = lstSelectedCourses;
gvSchedule.DataBind();
<
columns
>
<
telerik:gridtemplatecolumn
>
<
itemtemplate
>
<
asp:hiddenfield
id
=
"hfCourseID"
value='<%#Eval("CourseID") %>' runat="server" />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
<
telerik:gridtemplatecolumn
headertext
=
"Category"
>
<
itemtemplate
>
<
asp:label
id
=
"lblCategory"
runat
=
"server"
text='<%#Eval("Category") %>' />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
<
telerik:gridtemplatecolumn
headertext
=
"Subject"
>
<
itemtemplate
>
<
asp:label
id
=
"lblSubject"
runat
=
"server"
text='<%#Eval("Subject") %>' />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
<
telerik:gridtemplatecolumn
headertext
=
"Days"
>
<
itemtemplate
>
<
asp:label
id
=
"lblDays"
runat
=
"server"
text='<%#Eval("Days") %>' />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
<
telerik:gridtemplatecolumn
headertext
=
"Start Time"
>
<
itemtemplate
>
<
asp:label
id
=
"lblStartTime"
runat
=
"server"
text='<%#Eval("StartTime") %>' />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
<
telerik:gridtemplatecolumn
headertext
=
"End Time"
>
<
itemtemplate
>
<
asp:label
id
=
"lblEndTime"
runat
=
"server"
text='<%#Eval("EndTime") %>' />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
<
telerik:gridtemplatecolumn
headertext
=
"Term"
>
<
itemtemplate
>
<
asp:label
id
=
"lblTerm"
runat
=
"server"
text='<%#Eval("Term") %>' />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
<
telerik:gridtemplatecolumn
headertext
=
"Length (Weeks)"
>
<
itemtemplate
>
<
asp:label
id
=
"lblCourseLength"
runat
=
"server"
text='<%#Eval("CourseLength") %>' />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
<
telerik:gridtemplatecolumn
headertext
=
"Location"
>
<
itemtemplate
>
<
asp:label
id
=
"lblLocation"
runat
=
"server"
text='<%#Eval("Location") %>' />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
<
telerik:gridtemplatecolumn
headertext
=
"Cost"
>
<
itemtemplate
>
<
asp:label
id
=
"lblCourseCost"
runat
=
"server"
text='<%#Eval("Cost", "{0:C}") %>' />
</
itemtemplate
>
</
telerik:gridtemplatecolumn
>
</
columns
>
----------
Posted
on Jun 30, 2010
(permalink)
public
class
Marble : ISkin
{
public
Marble()
{
}
public
string
GetCSS()
{
StringBuilder css =
new
StringBuilder();
css.Append(@"
<Chart SkinName=
""
Marble
""
>
<ChartTitle>
<Appearance>
<FillStyle MainColor=
""
Transparent
""
/>
<Position AlignedPosition=
""
Top
""
/>
</Appearance>
<TextBlock>
<Appearance>
<TextProperties Font=
""
Arial, 22pt
""
Color=
""
89, 79, 52
""
/>
</Appearance>
</TextBlock>
</ChartTitle>
<Legend>
<Appearance Overflow=
""
Row
""
>
<ItemTextAppearance>
<TextProperties Color=
""
101, 91, 72
""
Font=
""
Georgia, 9pt
""
/>
</ItemTextAppearance>
<FillStyle MainColor=
""
Transparent
""
/>
<Position AlignedPosition=
""
Bottom
""
/>
<Dimensions Margins=
""
17.6%, 3%, 1px, 1px
""
/>
<Border Color=
""
Transparent
""
/>
</Appearance>
</Legend>
<Appearance TextQuality=
""
AntiAlias
""
>
<FillStyle FillType=
""
Image
""
>
<FillSettings ImageDrawMode=
""
Flip
""
BackgroundImage=
""
{chart}
""
/>
</FillStyle>
<Border Color=
""
181, 166, 132
""
/>
</Appearance>
<PlotArea>
<XAxis>
<Appearance Color=
""
Transparent
""
>
<MajorGridLines PenStyle=
""
Solid
""
Color=
""
94, 93, 87
""
/>
<MajorTick Color=
""
173, 164, 142
""
/>
<TextAppearance>
<TextProperties Color=
""
101, 91, 72
""
Font=
""
Georgia, 9pt
""
/>
</TextAppearance>
</Appearance>
<AxisLabel>
<TextBlock>
<Appearance>
<TextProperties Color=
""
101, 91, 72
""
Font=
""
Georgia, 9pt
""
/>
</Appearance>
</TextBlock>
</AxisLabel>
</XAxis>
<YAxis>
<Appearance Color=
""
Transparent
""
>
<MajorGridLines PenStyle=
""
Solid
""
Color=
""
94, 93, 87
""
/>
<MinorGridLines PenStyle=
""
Solid
""
Color=
""
94, 93, 87
""
/>
<MinorTick Color=
""
173, 164, 142
""
/>
<MajorTick Color=
""
173, 164, 142
""
/>
<TextAppearance>
<TextProperties Color=
""
101, 91, 72
""
Font=
""
Georgia, 9pt
""
/>
</TextAppearance>
</Appearance>
<AxisLabel>
<TextBlock>
<Appearance>
<TextProperties Color=
""
101, 91, 72
""
Font=
""
Georgia, 9pt
""
/>
</Appearance>
</TextBlock>
</AxisLabel>
</YAxis>
<Appearance>
<FillStyle FillType=
""
Image
""
>
<FillSettings ImageDrawMode=
""
Flip
""
BackgroundImage=
""
{plotarea}
""
ImageAlign=
""
Top
""
ImageFlip=
""
FlipY
""
/>
</FillStyle>
<Dimensions Margins=
""
22%, 24%, 12%, 10%
""
/>
<Border Color=
""
144, 136, 118
""
Width=
""
8
""
/>
</Appearance>
</PlotArea>
</Chart>");
return
css.ToString();
}
}
<ResourceTypes>
<telerik:ResourceType DataSourceID="sdsUsers" ForeignKeyField="UserID"
KeyField="UserID" Name="User_Name" TextField="User_Name" />
</ResourceTypes>
Protected Sub RadScheduler1_AppointmentDataBound(ByVal sender As Object, ByVal e As Telerik.Web.UI.SchedulerEventArgs) Handles RadScheduler1.AppointmentDataBound
If e.Appointment.Resources.GetResourceByType("User_Name") IsNot Nothing Then
e.Appointment.BackColor = DataBinder.Eval(e.Appointment.Resources.GetResourceByType("User_Name").DataItem, "BackColor")
End If
End Sub
My user table schema:
UserID
User_Name
BackColor
I still do not get any color for the scheduler. What went wrong with my setting?