Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
85 views
I have been trying to get CSS styles to load into a RadEditor with no luck.  The editor needs to show image manger, unordered list, indent, outdent and Apply Styles.  I was going nuts thinking it was something in my code, so I created a new Telerik Web Application.  My test app only has the default page that is created when you do new project.  I placed a RadEditor on the page and included my CSS stylesheet linked on the page.

The problem is that when the tools are changed/added, the stylesheet does not load.  I am not even writing any code, I am letting the configuration manager put the changes into the file.  See code below...

Is this a bug, or do I need to do something special?

Thanks,
        Paul


When the apsx page contains the following the Apply Styles works great:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
  
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Hay">
    </telerik:RadSkinManager>
    <div>
     
        <telerik:RadEditor ID="RadEditor1" Runat="server">
        </telerik:RadEditor>
    </div>
    </form>
</body>
</html>

When I customize the toolbar and the code looks like this, I get no dropdown for the Apply Styles.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<head runat="server">
    <title></title>
    <telerik:RadStyleSheetManager id="RadStyleSheetManager1" runat="server" />
    <link href="css/style.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <%--Needed for JavaScript IntelliSense in VS2010--%>
            <%--For VS2008 replace RadScriptManager with ScriptManager--%>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQueryInclude.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <script type="text/javascript">
        //Put your JavaScript code here.
    </script>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
    </telerik:RadAjaxManager>
  
    <telerik:RadSkinManager ID="RadSkinManager1" Runat="server" Skin="Hay">
    </telerik:RadSkinManager>
    <div>
     
        <telerik:RadEditor ID="RadEditor1" Runat="server">
            <Tools>
                <telerik:EditorToolGroup Tag="MainToolbar">
                    <telerik:EditorTool Name="Print" ShortCut="CTRL+P" />
                    <telerik:EditorTool Name="AjaxSpellCheck" />
                    <telerik:EditorTool Name="FindAndReplace" ShortCut="CTRL+F" />
                    <telerik:EditorTool Name="SelectAll" ShortCut="CTRL+A" />
                    <telerik:EditorTool Name="Cut" />
                    <telerik:EditorTool Name="Copy" ShortCut="CTRL+C" />
                    <telerik:EditorTool Name="Paste" ShortCut="CTRL+V" />
                    <telerik:EditorToolStrip Name="PasteStrip">
                    </telerik:EditorToolStrip>
                    <telerik:EditorSeparator />
                    <telerik:EditorSplitButton Name="Undo">
                    </telerik:EditorSplitButton>
                    <telerik:EditorSplitButton Name="Redo">
                    </telerik:EditorSplitButton>
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup Tag="InsertToolbar">
                    <telerik:EditorTool Name="ImageManager" ShortCut="CTRL+G" />
                    <telerik:EditorTool Name="DocumentManager" />
                    <telerik:EditorTool Name="FlashManager" />
                    <telerik:EditorTool Name="MediaManager" />
                    <telerik:EditorTool Name="TemplateManager" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="LinkManager" ShortCut="CTRL+K" />
                    <telerik:EditorTool Name="Unlink" ShortCut="CTRL+SHIFT+K" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="Superscript" />
                    <telerik:EditorTool Name="Subscript" />
                    <telerik:EditorTool Name="InsertParagraph" />
                    <telerik:EditorTool Name="InsertGroupbox" />
                    <telerik:EditorTool Name="InsertHorizontalRule" />
                    <telerik:EditorTool Name="InsertDate" />
                    <telerik:EditorTool Name="InsertTime" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="FormatCodeBlock" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorDropDown Name="FormatBlock">
                    </telerik:EditorDropDown>
                    <telerik:EditorDropDown Name="FontName">
                    </telerik:EditorDropDown>
                    <telerik:EditorDropDown Name="RealFontSize">
                    </telerik:EditorDropDown>
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorTool Name="AbsolutePosition" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="Bold" ShortCut="CTRL+B" />
                    <telerik:EditorTool Name="Italic" ShortCut="CTRL+I" />
                    <telerik:EditorTool Name="Underline" ShortCut="CTRL+U" />
                    <telerik:EditorTool Name="StrikeThrough" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="JustifyLeft" />
                    <telerik:EditorTool Name="JustifyCenter" />
                    <telerik:EditorTool Name="JustifyRight" />
                    <telerik:EditorTool Name="JustifyFull" />
                    <telerik:EditorTool Name="JustifyNone" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="Indent" />
                    <telerik:EditorTool Name="Outdent" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="InsertOrderedList" />
                    <telerik:EditorTool Name="InsertUnorderedList" />
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="ToggleTableBorder" />
                    <telerik:EditorTool Name="XhtmlValidator" />
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup>
                    <telerik:EditorSplitButton Name="ForeColor">
                    </telerik:EditorSplitButton>
                    <telerik:EditorSplitButton Name="BackColor">
                    </telerik:EditorSplitButton>
                    <telerik:EditorDropDown Name="ApplyClass">
                    </telerik:EditorDropDown>
                    <telerik:EditorToolStrip Name="FormatStripper">
                    </telerik:EditorToolStrip>
                </telerik:EditorToolGroup>
                <telerik:EditorToolGroup Tag="DropdownToolbar">
                    <telerik:EditorSplitButton Name="InsertSymbol">
                    </telerik:EditorSplitButton>
                    <telerik:EditorToolStrip Name="InsertTable">
                    </telerik:EditorToolStrip>
                    <telerik:EditorToolStrip Name="InsertFormElement">
                    </telerik:EditorToolStrip>
                    <telerik:EditorSplitButton Name="InsertSnippet">
                    </telerik:EditorSplitButton>
                    <telerik:EditorTool Name="ImageMapDialog" />
                    <telerik:EditorDropDown Name="InsertCustomLink">
                    </telerik:EditorDropDown>
                    <telerik:EditorSeparator />
                    <telerik:EditorTool Name="ConvertToLower" />
                    <telerik:EditorTool Name="ConvertToUpper" />
                    <telerik:EditorSeparator />
                    <telerik:EditorDropDown Name="Zoom">
                    </telerik:EditorDropDown>
                    <telerik:EditorSplitButton Name="ModuleManager">
                    </telerik:EditorSplitButton>
                    <telerik:EditorTool Name="ToggleScreenMode" ShortCut="F11" />
                    <telerik:EditorTool Name="AboutDialog" />
                </telerik:EditorToolGroup>
            </Tools>
            <Content>
</Content>
        </telerik:RadEditor>
    </div>
    </form>
</body>
</html>
Rumen
Telerik team
 answered on 04 Aug 2011
1 answer
214 views
I have radgrid uses Radajaxloadingpanel, I also have a linkedbutton which is located inside he radgrid, When the button clicks, it does Response.WriteFile to pop up the window file save dialogbox, at this time, I click cancel button or click open file button, the radajaxloadingpanel is always loading and never stops. How I solve this problem?

I tried

 

RadScriptManager1

 

 

.RegisterPostBackControl(linkBtn) on radgrid_ItemCreated, it doens't help at all.

Please help.

Thanks.

 

Pavlina
Telerik team
 answered on 04 Aug 2011
1 answer
393 views
I'm trying to concatenate strings (table fields) via SQL SELECT statement and use the values in the

DataDescriptionField

 

of RadSchduler (TEXTAREA).  However, I want to create line breaks between the field values.

SELECT 'Field 1: ' + field1 + ' \r\n ' + 'Field 2: ' +  field2 AS ConcatString
FROM Table1

I want the appointment description (textarea) to display...

Field 1:  Field1 Value
Field 2:  Field2 Value

What do I use to create this?  The "\r\n" didn't work.  It displays as (literal) string.  

I am trying to populate the Description textarea on an appointment using Telerik's RadScheduler.

<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="1000px" Height="750px" SelectedDate="2011-08-01"
DayStartTime="00:00:00" DayEndTime="23:59:59" TimeZoneOffset="00:00:00" DataSourceID="SurgeryDataSource2"
DataKeyField="surID" DataDescriptionField="ConcatString" DataSubjectField="specialtyType" DataStartField="start_date" DataEndField="end_date">

Thanks.

Edward

 

Peter
Telerik team
 answered on 04 Aug 2011
1 answer
80 views
I have a hierarchical grid containing the parent and a single child. Both forms use a templated editform. I've added custom buttons to both forms for handling insert/update/Cancel. However, on the child form, none of these seem to be firing the standard RadGrid events.

Any reason why this might be? I've checked the child grid's editform over and compared it to the parent grid's editform and can't see a problem.

Correction: Just looked deeper into it and the cancel button works. Pressing the insert button causes a response but doesn't affect the grid and doesn't store anything in the database.
Tsvetina
Telerik team
 answered on 04 Aug 2011
5 answers
137 views
I start a new Visual Web Part project, add an SPDataSource to any Sharepoint list, and then add a telerik control, and map the control to the datasource and VS freezes.  This happens with the radlistbox, radgrid, and radlistview at a minimum.  I've used RadMenu and several other controls in my Sharepoint 2010 environment without issues.  Also, if I use a regular grid control and bind it to SPDataSource there's no problems.

I'm just simply adding it this way.

<SharePoint:SPDataSource ID="SPDataSource1" runat="server"
    DataSourceMode="List"
    UseInternalName="true" 
    SelectCommand="<View></View>">
    <SelectParameters>
        <asp:Parameter Name="WebUrl" DefaultValue="/subsite/" />
        <asp:Parameter Name="ListName" DefaultValue="Contacts" />
    </SelectParameters>
</SharePoint:SPDataSource>

Any ideas why this would be happening?  Can you test it out?
Maria Ilieva
Telerik team
 answered on 04 Aug 2011
5 answers
1.4K+ views
hi,

I have rad grid control and it has template Column, i want to find the control ID(e.g rtpTime)  inside the rad grid using java script.
As well as im using Master page.
Can you plz tell me the way of doing this, because this is ugent.

 <telerik:GridTemplateColumn HeaderText="Time" UniqueName="time" > 
            <EditItemTemplate> 
                <telerik:RadTimePicker ID="rtpTime" runat="server" > 
                </telerik:RadTimePicker> 
                 </EditItemTemplate> 
            <ItemTemplate> 
            <asp:Label ID="lbltime" runat="server" Text='<%# Eval "Time","{0:t}") %>' ></asp:Label> 
            </ItemTemplate> 
        </telerik:GridTemplateColumn> 

Thanks
Waruni
Radoslav
Telerik team
 answered on 04 Aug 2011
3 answers
106 views
Hi,

I have recently upgraded my project to use .Net 4.0 and all seemed fine until I started trying to run some reports using Crystal which were all fine previously.  I get the following error when I try to run the report and print to PDF. The message seems to indicate some issue with the Script Manager or Compression, both of which are enabled.

  SCRIPT5007: 'undefined' is null or not an object  Telerik.Web.UI.WebResource.axd?
_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=%3b%3bSystem.Web.Extensions%2c+Version%3d4.0.0.0%2c+Culture%3dneutral%2c+PublicKeyToken%3d31bf3856ad364e35%3aen-GB%3a1f68db6e-ab92-4c56-8744-13e09bf43565%3aea597d4b%3ab25378d2%3bTelerik.Web.UI%2c+Version%3d2010.3.1317.40%2c+Culture%3dneutral%2c+PublicKeyToken%3d121fae78165ba3d4%3aen-GB%3a9506cff2-3a86-46c5-b869-6ba1478f3c27%3a16e4e7cd%3af7645509%3a24ee1bba%3af46195d3%3a1e771326%3aaa288e2d%3a19620875%3a874f8ea2%3a490a9d4e%3abd8f85e4%3aed16cbdc, line 6 character 55898

length,n=b.length;g<n;g++,m++)d[m]=b[g]}else if(typeof b==="object"&&Object.getType(b)===Object){d=f.apply(a);Sys$Component$_setProperties(d,b)}}}if(h)a.endUpdate()}function Sys$Component$_setReferences(c,b){for(var a in b){var e=c["set_"+a],d=$find(b[a]);e.apply(c,[d])}}var $create=Sys.Component.create=function(h,f,d,c,g){var a=g?new h(g):new h,b=Sys.Application,i=b.get_isCreatingComponents();a.beginUpdate();if(f)Sys$Component$_setProperties(a,f);if(d)for(var e in d)a["add_"+e](d[e]);if(a.get_id())b.addComponent(a);if(i){b._createdComponents[b._createdComponents.length]=a;if(c)b._addComponentToSecondPass(a,c);else a.endUpdate()}else{if(c)Sys$Component$_setReferences(a,c);a.endUpdate()}return a};Sys.UI.MouseButton=function(){throw Error.notImplemented()};Sys.UI.MouseButton.prototype={leftButton:0,middleButton:1,rightButton:2};Sys.UI.MouseButton.registerEnum("Sys.UI.MouseButton");Sys.UI.Key=function(){throw Error.notImplemented()};Sys.UI.Key.prototype=

When I debug the following line is highlighted (shown in bold below):

{backspace:8,tab:9,enter:13,esc:27,space:32,pageUp:33,pageDown:34,end:35,home:36,left:37,up:38,right:39,down:40,del:127};Sys.UI.Key.registerEnum("Sys.UI.Key");Sys.UI.Point=function(a,b){this.x=a;this.y=b};Sys.UI.Point.registerClass("Sys.UI.Point");Sys.UI.Bounds=function(c,d,b,a){this.x=c;this.y=d;this.height=a;this.width=b};Sys.UI.Bounds.registerClass("Sys.UI.Bounds");Sys.UI.DomEvent=function(e){var a=e,b=this.type=a.type.toLowerCase();th


Any ideas why this is happening?

Dave Penny
David Penny
Top achievements
Rank 2
 answered on 04 Aug 2011
1 answer
78 views
Hi,

I am using telerik grid and editfromtemplate, and what happen is that whenever I refresh the page after inserting a record in telerik grid. It makes one more entry in the grid and in the database. I want to prevent this behaviour of grid because it's causing duplicate number of records in my grid.

Imports Telerik.Web.UI
 
Partial Class SNR_Config
    Inherits System.Web.UI.UserControl
 
    Private dbContext As New SNRDentonDBLayerDataContext
 
   Protected Sub rgConfiguration_NeedDataSource(ByVal source As Object, ByVal e As Telerik.Web.UI.GridNeedDataSourceEventArgs) Handles rgConfiguration.NeedDataSource
 
        BindGrid()
 
    End Sub
 
    Protected Sub BindGrid()
 
        Dim IConfig = From Config In dbContext.SNR_Configurations Order By Config.ID Descending
              Select Config
 
        rgConfiguration.DataSource = IConfig.ToList
 
 
    End Sub
 
 
    Protected Sub rgConfiguration_ItemCommand(ByVal source As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles rgConfiguration.ItemCommand
 
        If e.CommandName = RadGrid.PerformInsertCommandName Then
            Insert(e)
        ElseIf e.CommandName = RadGrid.UpdateCommandName Then
            Update(e)
        ElseIf e.CommandName = "Delete" Then
            Delete(e)
        End If
 
    End Sub
 
    Protected Sub Insert(ByVal e As Telerik.Web.UI.GridCommandEventArgs)
 
        If TypeOf e.Item Is GridEditFormInsertItem AndAlso e.Item.IsInEditMode Then
 
            If e.Item.OwnerTableView.IsItemInserted Then
 
                Dim txtKey As TextBox = e.Item.FindControl("txtKey")
                Dim txtValue As TextBox = e.Item.FindControl("txtValue")
                Dim chkIsAdmin As CheckBox = e.Item.FindControl("chkIsAdmin")
 
                Dim con As New SNR_Configuration
                con.ConfigKey = txtKey.Text.Trim
                con.ConfigValue = txtValue.Text.Trim
                con.CreatedOn = DateTime.Now
                con.CreatedBY = DotNetNuke.Entities.Users.UserController.GetCurrentUserInfo.UserID
                con.IsDeleted = False
                con.IsAdmin = IIf(chkIsAdmin.Checked, True, False)
 
                dbContext.SNR_Configurations.InsertOnSubmit(con)
                dbContext.SubmitChanges()
 
            End If
 
        End If
 
    End Sub
 
    Protected Sub rgConfiguration_ItemDataBound(ByVal source As Object, ByVal e As Telerik.Web.UI.GridItemEventArgs) Handles rgConfiguration.ItemDataBound
 
 
        If TypeOf e.Item Is GridEditableItem And e.Item.IsInEditMode Then
 
            If TypeOf e.Item Is GridEditableItem And TypeOf e.Item Is GridEditFormInsertItem Then
 
                Dim btnInsert As Button = e.Item.FindControl("btnInsert")
                btnInsert.Visible = True
 
            Else
 
                Dim btnUpdate As Button = e.Item.FindControl("btnUpdate")
                btnUpdate.Visible = True
 
            End If
 
        End If
 
 
    End Sub
    
 
 
 
End Class
Tsvetina
Telerik team
 answered on 04 Aug 2011
11 answers
494 views
We have a RadGrid that has mostly bound columns but a few template columns.  When grouping by any or all of the bound columns and then the template columns, there are no issues.  However, when choosing a template column first and then a bound column, we always get the error "An error occured adding a relation to DataRelationCollection. Please, make sure you have configured the expressions properly - both GroupByFields and SelectFields are required".
Pavlina
Telerik team
 answered on 04 Aug 2011
2 answers
124 views
hi i want to set mastertableview itemtemplate from code behind
like this example :
http://www.telerik.com/help/aspnet/grid/grdprogrammaticcreation.html
but for the mastertableview itemtemplate not the column itemtemplate 
Tsvetina
Telerik team
 answered on 04 Aug 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?