I am trying to modify the contents of a RadGrid Column HeaderText item in C#.
I was unable to modify inline font characteristics from within the HeaderText property in the markup, so i tried in the code-behind thusly:
01.protected void RadGrid1_ItemCreated(object sender, Telerik.Web.UI.GridItemEventArgs e)02. {03. if (e.Item is GridHeaderItem)04. {05. GridHeaderItem header = (GridHeaderItem)e.Item;06. 07. foreach (string col in SysInvCols)08. {09. Label lbl = new Label();10. lbl.ID = "Label1";11. header[col].Controls.Add(lbl);12. lbl.Text = "E";13. lbl.Font.Name = "Windings 3";14. }15. }Unfortunately, the font is not modified as i would expect. Is there another way to do what i'm trying to do?
Note: ASCII Character Code 69, the captial letter E in latin, and in wingdings 3 it is a pair of arrows (one pointing up and the other pointing down).
Please see attached image for clarity.

I have installed the new 7.1.3 version. However when I switch to Edit Page I get the exception listed below. Everything is correctly installed, the ToolsFile.xml is in C:\Program Files\Common Files\Microsoft Shared\web server extensions\wpresources\RadEditorSharePoint\4.3.0.0__1f131a624888eeed\RadControls\Editor
RadEditor in Page Layout:<radE:RadHtmlField ID="RadEditorTextE" FieldName="AMCTextXHTML" runat="server" AllowFonts="False" AllowHtmlSourceEditing="True" DisplayHeight="400px" DisplayWidth="430px" DisableCustomStyles="True"></radE:RadHtmlField>
Any idea what might be wrong?
Regards,
Hugo
Could not find a part of the path 'c:\windows\system32\inetsrv\~\RadControls\Editor\ToolsFile.xml'.
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
|

Hello,
I have a radscheduler on my page. It is currently ordered by default, by start time of the appointment. I want the appointments to be sorted by a custom property "CompanyLocation". I followed this post but could not get the correct result. The post is this
http://www.telerik.com/community/forums/aspnet-ajax/scheduler/how-can-i-change-the-display-order-of-the-radscheduler-appointment-in-monthview.aspx
At the bottom you will see my comment there. I was wondering if that thread is closed. Basically I load a datatable from my stored procedure with 6 columns ID,Subject,Start,end,CompanyLocation. In mark up I have
CustomAttributeNames="CompanyLocation" EnableCustomAttributeEditing="true"
In my pageload I call a BindData function that populates and fills the datatable which I bind
radScheduler.DataSource = dt
radScheduler.DataBind()
Protected Overrides Sub OnInit(e As EventArgs)
MyBase.OnInit(e)
radScheduler.AppointmentComparer = New CustomAppointmentComparer("CompanyLocation", SortDirection.Descending)
End Sub
My CustomAppointmentComparer class is like this:
Class CustomAppointmentComparer
Implements IComparer
 
Private m_strField As String
Private _sortDirection As SortDirection
Sub New(strField As String, sortDirection As SortDirection)
m_strField = strField
_sortDirection = sortDirection
End Sub
Public Function Compare(first As Appointment, second As Appointment) As Integer
If first.Start < second.Start Then
Return -1
End If
If first.Start > second.Start Then
Return 1
End If
If first.[End] > second.[End] Then
Return -1
End If
Return [String].Compare(first.Attributes(m_strField), second.Attributes(m_strField))
End Function
Public Function Compare1(ByVal x As Object, ByVal y As Object) As Integer Implements System.Collections.IComparer.Compare
Dim apt1 As Appointment
Dim apt2 As Appointment
If GetType(Appointment).IsInstanceOfType(x) Then
apt1 = CType(x, Appointment)
Else
Throw New Exception("Casting failed...")
End If
If GetType(Appointment).IsInstanceOfType(y) Then
apt2 = CType(y, Appointment)
Else
Throw New Exception("Casting failed...")
End If
Select Case _sortDirection
Case SortDirection.Ascending
Return x.GetType.GetProperty(m_strField).GetValue(x, Nothing) < y.GetType.GetProperty(m_strField).GetValue(y, Nothing)
Case Else 'SortDirection.Descending
Return x.GetType.GetProperty(m_strField).GetValue(x, Nothing) > y.GetType.GetProperty(m_strField).GetValue(y, Nothing)
End Select
End Function
End Class
So what is that I am doing wrong?
