Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
107 views

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.



Pavlina
Telerik team
 answered on 17 Sep 2014
3 answers
86 views
Hello,

I have a Radgrid with a detail table.  The detail table works fine.  If I group the main Radgrid by one column, I can still expand the group, and then the detail table, and it displays fine.

If I group the main radgrid by two columns, I can expand the groups fine, but when I expand the detail table, it does not show.  Strangely, it is populated fine, but the row is created with 'display: none;'.

If I remove the style tag from that row using Chrome's 'inspect element' function, the detail table shows just fine, with appropriate data.

Is this a bug?  I don't have any Javascript functionality, so the 'style' tag must be added by the Radgrid.  The Radgrid uses client-side grouping, and is also using an ajax manager.

See it in action here: http://www.hotslogs.com/Account/MatchHistory?PlayerID=17.  Group by 'Character', and you can still expand detail table.  Group by 'Character' and 'Map', and the detail table doesn't show.  Inspect the element and you can find the detail table's row with 'display: none;'
Konstantin Dikov
Telerik team
 answered on 17 Sep 2014
0 answers
92 views
Hi 
I'm migrating a Sharepoint 2007 32 to 64-bit and I'm having the following issue

Could not find a part of the path
'c:\Windows\System32\inetsrv\~\wpresources\Telerik\ToolsFileVideo.xml'.
Description:
An unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the error and
where it originated in the code.

Exception Details:
System.IO.DirectoryNotFoundException: Could not find a part of the path
'c:\Windows\System32\inetsrv\~\wpresources\Telerik\ToolsFileVideo.xml'.

Source
Error:

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.

Stack Trace:

[DirectoryNotFoundException: Could not find a part of the path 'c:\Windows\System32\inetsrv\~\wpresources\Telerik\ToolsFileVideo.xml'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +239
System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +2580
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy) +138
System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) +94
System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) +121
System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) +65
System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) +76
System.Threading.CompressedStack.runTryCode(Object userData) +118
System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) +0
System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) +122
System.Xml.XmlTextReaderImpl.OpenUrl() +5028124
System.Xml.XmlTextReaderImpl.Read() +152
System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +165
System.Xml.XmlDocument.Load(XmlReader reader) +134
System.Xml.XmlDocument.Load(String filename) +95
Telerik.Web.UI.RadEditor.get_ToolsFileContent() +354
Telerik.Web.UI.ToolsFileLoader.LoadColors(EditorColorCollection colors) +67
Telerik.Web.UI.RadEditor.LoadToolsFile(Boolean loadOnlyEmptyCollections) +228
Telerik.SharePoint.FieldEditor.RadHtmlField.set_ToolsFile(String value) +42
T_RadHtmlField_ToolsFile_110.SetProperty(Object , Object ) +94
System.Web.Util.FastPropertyAccessor.SetProperty(Object target, String propName, Object val, Boolean inDesigner) +118
System.Web.UI.PropertyMapper.SetMappedPropertyValue(Object obj, String mappedName, Object value, Boolean inDesigner) +61
System.Web.UI.ControlBuilder.SetSimpleProperty(SimplePropertyEntry entry, Object obj) +165

[HttpException (0x80004005): '~/wpresources/Telerik/ToolsFileVideo.xml' could not be set on property 'ToolsFile'.]
System.Web.UI.ControlBuilder.SetSimpleProperty(SimplePropertyEntry entry, Object obj) +3962194
System.Web.UI.ControlBuilder.InitSimpleProperties(Object obj) +217
System.Web.UI.ControlBuilder.InitObject(Object obj) +227
System.Web.UI.ControlBuilder.BuildObjectInternal() +290
System.Web.UI.ControlBuilder.BuildChildren(Object parentObj) +561
System.Web.UI.TemplateBuilder.InstantiateIn(Control container) +438
System.Web.UI.WebControls.ContentBuilderInternal.InstantiateIn(Control container) +35
System.Web.UI.WebControls.ContentPlaceHolderBuilder.BuildObject() +238
System.Web.UI.ControlBuilder.BuildChildren(Object parentObj) +561
System.Web.UI.ControlBuilder.InitObject(Object obj) +536
System.Web.UI.ControlBuilder.BuildObjectInternal() +290
System.Web.UI.ControlBuilder.BuildChildren(Object parentObj) +561
System.Web.UI.ControlBuilder.InitObject(Object obj) +536
System.Web.UI.ControlBuilder.BuildObjectInternal() +290
System.Web.UI.ControlBuilder.BuildChildren(Object parentObj) +561
System.Web.UI.ControlBuilder.InitObject(Object obj) +536
System.Web.UI.ControlBuilder.BuildObjectInternal() +290
System.Web.UI.ControlBuilder.BuildChildren(Object parentObj) +561
System.Web.UI.ControlBuilder.InitObject(Object obj) +536
System.Web.UI.FileLevelPageControlBuilder.InitObject(Object obj) +68
System.Web.Compilation.BuildResultNoCompileTemplateControl.FrameworkInitialize(TemplateControl templateControl) +118
System.Web.UI.TemplateControl.FrameworkInitialize() +193
System.Web.UI.MasterPage.CreateMaster(TemplateControl owner, HttpContext context, VirtualPath masterPageFile, IDictionary contentTemplateCollection) +1305
System.Web.UI.Page.get_Master() +69
System.Web.UI.Page.ApplyMasterPage() +18
System.Web.UI.Page.PerformPreInit() +58
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1256
I don't know where to change the path.

I read that I have to change the path, but I don't  know where to change it.
Can someone help me?


Ian
Top achievements
Rank 1
 asked on 17 Sep 2014
4 answers
416 views

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'.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'c:\windows\system32\inetsrv\~\RadControls\Editor\ToolsFile.xml'.

Source Error:

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.

Stack Trace:

[DirectoryNotFoundException: Could not find a part of the path 'c:\windows\system32\inetsrv\~\RadControls\Editor\ToolsFile.xml'.]
  System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +2014144
  System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy) +998
  System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize) +113
  System.Xml.XmlDownloadManager.GetStream(Uri uri, ICredentials credentials) +78
  System.Xml.XmlUrlResolver.GetEntity(Uri absoluteUri, String role, Type ofObjectToReturn) +51
  System.Xml.XmlTextReaderImpl.OpenUrlDelegate(Object xmlResolver) +44
  System.Threading.CompressedStack.runTryCode(Object userData) +54
  System.Runtime.CompilerServices.RuntimeHelpers.ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData) +0
  System.Threading.CompressedStack.Run(CompressedStack compressedStack, ContextCallback callback, Object state) +174
  System.Xml.XmlTextReaderImpl.OpenUrl() +199
  System.Xml.XmlTextReaderImpl.Read() +50
  System.Xml.XmlLoader.Load(XmlDocument doc, XmlReader reader, Boolean preserveWhitespace) +145
  System.Xml.XmlDocument.Load(XmlReader reader) +96
  System.Xml.XmlDocument.Load(String filename) +157
  Telerik.WebControls.RadEditor.LoadToolsFile() +629

[Exception: Cannot find tools file ~/RadControls/Editor/ToolsFile.xml Please make sure the file exists or that RadControls folder have been properly set.]
  Telerik.WebControls.RadEditor.LoadToolsFile() +717
  Telerik.WebControls.RadEditor.EnsureToolsFileLoaded() +279
  Telerik.WebControls.RadEditor.get_Toolbars() +10
  Telerik.SharePoint.EditorTools.RemoveTool(RadEditor contentEditor, String toolName) +28
  Telerik.SharePoint.FieldEditor.RadHtmlField.OnLoad(EventArgs e) +610
  System.Web.UI.Control.LoadRecursive() +47
  System.Web.UI.Control.LoadRecursive() +131
  System.Web.UI.Control.LoadRecursive() +131
  System.Web.UI.Control.LoadRecursive() +131
  System.Web.UI.Control.LoadRecursive() +131
  System.Web.UI.Control.LoadRecursive() +131
  System.Web.UI.Control.LoadRecursive() +131
  System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1061


Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42
Ian
Top achievements
Rank 1
 answered on 17 Sep 2014
0 answers
111 views
AP
Hello, Couple of questions please. 

1)Will Telerik rad controls work with Angular?
2) What are the main diff. Between Radcontrols and Kendo UI controls?

Thanks.
A
Top achievements
Rank 1
 asked on 17 Sep 2014
8 answers
228 views

With multi select turned on, I know I can select multiple rows by holding down ctrl, but can I make the grid do the same without holding down ctrl? (Meaning, clicking a row will either select or deselect it, without altering the state of other rows, just like clicking GridClientSelectColumn does.)
Michael
Top achievements
Rank 1
 answered on 17 Sep 2014
1 answer
85 views
Hello,

I've been trying to figure out how to allow the numerictextbox to mask the input as it is beeing written, for example, i want to write the number 12345.1, and i want it to look like this.

{numerictextbox selected}
1
12
123
1,234
12,345
12,345.1
{enter key pressed}

The idea, basically, is to have the same functionality that the devexpress control has with the "g" on the masksettings option.

Thanks
Eyup
Telerik team
 answered on 17 Sep 2014
1 answer
216 views
2014.2.909.45

Can you tell me what is the correct syntax for these two usages:

Clear the column's filter: - not working as expected when passing blank in the 2nd parameter.
tableview.filter("profile", '', "NoFilter");

Setting the filter to IsNull - not working as expected when passing blank in the 2nd parameter.
tableView.filter("profile", '' , "IsNull");


    <telerik:GridTemplateColumn HeaderText="Profile" HeaderStyle-Width="200px" UniqueName="sf_profile" DataField="profile" DataType="System.String">
                        <ItemTemplate>
                            <%# Eval("profile") %>
                        </ItemTemplate>
                        <EditItemTemplate>
                            <telerik:RadDropDownList runat="server" ID="ProfileIdropDown" DataValueField="lov_profile" DataTextField="lov_profile" Width="200px"
                                 DataSourceID="srcProfile">
                            </telerik:RadDropDownList>
                        </EditItemTemplate>
                        <FilterTemplate>
                            <telerik:RadComboBox runat="server" ID="cboProfileFilter" DataSourceID="srcProfile" AppendDataBoundItems="true" Width="200px"
                                DataValueField="lov_profile" DataTextField="lov_profile"
                                SelectedValue='<%# ((GridItem)Container).OwnerTableView.GetColumn("profile").CurrentFilterValue %>'
                                OnClientSelectedIndexChanged="ProfileIndexChanged">
                                <Items>
                                    <telerik:RadComboBoxItem Text="All" />
                                    <telerik:RadComboBoxItem Text="[Blank]" Value="" />
                                </Items>                        
                            </telerik:RadComboBox>
                        
                            <telerik:RadScriptBlock ID="RadScriptBlockProfile" runat="server">
                                <script type="text/javascript">
                                    function ProfileIndexChanged(sender, args) {
                                        var tableView = $find("<%# ((GridItem)Container).OwnerTableView.ClientID %>");
                                        if (args.get_item().get_value() == 'All') {
                                            tableview.filter("profile", '', "NoFilter");
                                        } else if (args.get_item().get_value() == '') {
                                            tableView.filter("profile", '' , "IsNull");
                                        } else {
                                            tableView.filter("profile", args.get_item().get_value(), "EqualTo");                                            
                                        }
                                    }
                                </script>
                            </telerik:RadScriptBlock>                           
                        </FilterTemplate>
                    </telerik:GridTemplateColumn>
Lenny_shp
Top achievements
Rank 2
 answered on 17 Sep 2014
4 answers
243 views

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?

Plamen
Telerik team
 answered on 17 Sep 2014
2 answers
197 views
hello

I am using Radgrid with template column of Radtextbox
as shown in attached image i want to nevigate to next textbox using arrow keys.

ie if left arrow key is clicked it should nevigate to left textbox and if down arrow key is clicked it should nevigate to below textbox

one more problem is - when up/down arrow key is clicked in RadNumeric textbox it increase/decrease the number how to avoid this behavoiur.

thanks
Kishor Dange
Kishor
Top achievements
Rank 2
 answered on 17 Sep 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Chester
Top achievements
Rank 1
Iron
Simon
Top achievements
Rank 1
Iron
Douglas
Top achievements
Rank 2
Iron
Iron
SUNIL
Top achievements
Rank 3
Iron
Iron
Iron
Marco
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?