Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
263 views
I am looking for a solution that will allow me to click a button or a hyperlink within a row and open a folder on our network.  The location to be opened is stored in the record source for that grid.

I have tried a couple of things, both of which failed.  Granted, the solution I have are either my own creation or a hybrid of my code and assistance from the forums.


FAILED SOLUTION #1
This column contains a button that opens the folder.  This does work locally, but does not work when published to our web folder.
<telerik:GridButtonColumn FilterControlAltText="Filter Files column" CommandName="ShowFiles"  UniqueName="Files" ButtonType="PushButton" HeaderText="Files" Exportable="False" Text="Display">
</telerik:GridButtonColumn>

Protected Sub RadGrid1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
 
    Dim value As String
 
    If e.CommandName = "ShowFiles" Then
        Dim dataItm As GridDataItem = TryCast(e.Item, GridDataItem)
 
        value = dataItm("Location").Text & "\03 Submitted\"
  
        Process.Start("explorer.exe", value)
  
    End If
 
End Sub


FAILED SOLUTION #2
This does nothing but reload the page. 
<telerik:GridTemplateColumn UniqueName="LinkColumn">
    <ItemTemplate>
        <asp:LinkButton runat="server" ID="LinkButton1" CommandName="ShowFiles"></asp:LinkButton>
    </ItemTemplate>
</telerik:GridTemplateColumn>

Private Sub RadGrid1_ItemDataBound(sender As Object, e As GridItemEventArgs) Handles RadGrid1.ItemDataBound
 
    If TypeOf e.Item Is GridDataItem Then
        Dim item As GridDataItem = TryCast(e.Item, GridDataItem)
        Dim row As DataRow = TryCast(item.DataItem, DataRowView).Row
        Dim linkButton As LinkButton = TryCast(item("Location").FindControl("LinkButton1"), LinkButton)
        linkButton.Text = "Location"
        linkButton.PostBackUrl = "#"
    End If
 
End Sub

  
Protected Sub RadGrid1_ItemCommand(ByVal sender As Object, ByVal e As Telerik.Web.UI.GridCommandEventArgs) Handles RadGrid1.ItemCommand
 
    Dim value As String
 
    If e.CommandName = "ShowFiles" Then
 
        Dim linkButton As LinkButton = TryCast(e.CommandSource, LinkButton)
        Dim dataItm As GridDataItem = TryCast(e.Item, GridDataItem)
        value = dataItm("Location").Text & "\03 Submitted\"
 
        Process.Start("explorer.exe", value)
 
    End If
 
End Sub
Rick
Top achievements
Rank 1
 answered on 04 Jun 2014
1 answer
103 views
Hi ,

I am using Rad Menu.
When I hover my cursor over the rad menu, it opens- which is an expected behaviour.
When I remove my cursor from it, it gets closed- which is also an expected behaviour.
Now when I remove my cursor from it and try to move near the area of menu before it is closed completely, it opens again - Which is not expected.

I have one button beneath the Menu, when I open the menu and think that I dont want to use menu but click the button instead,
I cannot use it within that fraction of second, I need to wait till the menu gets closed completely., otherwise it will open itself again.
Which is quite cumbersome for the user, especially when my Menu list is quite long.

Can any one please suggest how to solve this issue.

Thanks in advance...!!
Plamen
Telerik team
 answered on 04 Jun 2014
3 answers
114 views
Hi, 

I have a problem with the appointment move in the asp.net scheduler. Sometimes when i move the appointment to another slot, it doesn´t stay there. In some machines it never works in some months like (november and december 2014). It happens in all views (month, week, day...). I debbugged the app and when the problem happens it doesn´t show any erros in the pageMethod that update the appointment date. I need a solution for this issue.

Asp.net framework: 3.5
Telerik Version: 2013.1.417.35

Thanks
Hristo Valyavicharski
Telerik team
 answered on 04 Jun 2014
2 answers
361 views
I'm trying to get the currentToggleState text value of Button/Checkbox from within another javascript function of mine.  If I wire in the online example to get at this value as such things work fine:

<telerik:RadButton ID="chkboxMaster" runat="server"  OnClientToggleStateChanged="setToggleChange" ToggleType="CheckBox" ButtonType="LinkButton">
<ToggleStates>
<telerik:RadButtonToggleState Text="Active" Selected="true" PrimaryIconCssClass="rbToggleCheckboxChecked" />
<telerik:RadButtonToggleState Text="InActive" PrimaryIconCssClass="rbToggleCheckbox" />
</ToggleStates>
</telerik:RadButton>

​function setToggleChange(sender, args) {
                
                var tState = args.get_currentToggleState().get_text();  //text value is here
}

function WhatIsTheCurrentToggleText()
{
  //need to get the value here
    var toggleBtn = $find("<%= chkboxMaster.ClientID %>");
    var tv = toggleBtn.get_currentToggleState().get_text();  //no luck
}
Erik
Top achievements
Rank 1
 answered on 04 Jun 2014
5 answers
358 views
I am using v2014.1.403.45 of the ASP Ajax controls and was looking at implementing a Between and Not Between filter on my columns, the problem is the default implementation does not appear to support this functionality.

I know I can use the GridBoundColumn and use the DataType property to implement these filters but I also lose the formatting on the edit / insert, such as only allowing numeric entry in a GridNumericColumn. Is there a way to implement these additional search criteria use GridNumericColumn and GridDateTimeColumn?

Here is my current implementation.

<telerik:RadGrid ID="RadGrid1" runat="server" OnPreRender="RadGrid1_PreRender" AutoGenerateColumns="False" PagerStyle-Position="Bottom" PageSize="20" 
                     EnableLinqExpressions="False" AllowPaging="True" AllowSorting="True" GridLines="None" ShowGroupPanel="True" Skin="WebBlue" 
                     DataSourceID="SqlDataSource1" OnItemDataBound="RadGrid1_ItemDataBound">

    <MasterTableView EditMode="PopUp" AllowFilteringByColumn="true" CommandItemDisplay="Top" AllowMultiColumnSorting="true">

        <CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
        <RowIndicatorColumn FilterControlAltText="Filter RowIndicator column"></RowIndicatorColumn>
        <ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column"></ExpandCollapseColumn>

            <Columns>

                <telerik:GridEditCommandColumn ButtonType="ImageButton" UniqueName="EditCommandColumn" />

                <telerik:GridBoundColumn DataField="ReportKey" FilterControlAltText="Filter ReportKey column" HeaderText="ReportKey"
                                            SortExpression="ReportKey" UniqueName="ReportKey">
                    <FilterTemplate>
                        <telerik:RadComboBox ID="RadComboBoxReportKey" DataSourceID="SqlDataSource2" DataTextField="ReportKey" DataValueField="ReportKey" 
                                                AppendDataBoundItems="true" CheckBoxes="true" runat="server" EmptyMessage="Select Report Key's">
                        </telerik:RadComboBox>
                        <asp:ImageButton ID="SearchButton" runat="server" AlternateText="Filter" ToolTip="Filter by Report Key's" 
                                            OnClick="SearchButton_Click" ImageUrl="~/search.png" />
                    </FilterTemplate>
                </telerik:GridBoundColumn>
                

                <telerik:GridNumericColumn DataField="PrepTime" AllowFiltering="true" HeaderText="PrepTime"
                    SortExpression="PrepTime" UniqueName="PrepTime">
                </telerik:GridNumericColumn>

                <telerik:GridNumericColumn DataField="TravelTime" AllowFiltering="true" HeaderText="TravelTime"
                    SortExpression="TravelTime" UniqueName="TravelTime">
                </telerik:GridNumericColumn>

                <telerik:GridNumericColumn DataField="VisitTime" AllowFiltering="true" HeaderText="VisitTime"
                    SortExpression="VisitTime" UniqueName="VisitTime">
                </telerik:GridNumericColumn>

                <telerik:GridCheckBoxColumn DataField="IsVerified" AllowFiltering="true" HeaderText="IsVerified"
                    SortExpression="IsVerified" UniqueName="IsVerified">
                </telerik:GridCheckBoxColumn>

                <telerik:GridCheckBoxColumn  DataField="IsDeleted" AllowFiltering="true" HeaderText="IsDeleted"
                    SortExpression="IsDeleted" UniqueName="IsDeleted">
                </telerik:GridCheckBoxColumn >

                <telerik:GridBoundColumn DataField="LastSavedByUID" AllowFiltering="true" HeaderText="LastSavedByUID"
                    SortExpression="LastSavedByUID" UniqueName="LastSavedByUID">
                </telerik:GridBoundColumn>
            
                <telerik:GridDateTimeColumn DataField="DateLastSaved" AllowFiltering="true" HeaderText="DateLastSaved"
                    SortExpression="DateLastSaved" UniqueName="DateLastSaved">
                </telerik:GridDateTimeColumn>                       

            </Columns>

        <EditFormSettings>
            <EditColumn FilterControlAltText="Filter EditCommandColumn column"></EditColumn>
        </EditFormSettings>

    </MasterTableView>

    <ClientSettings AllowDragToGroup="True">
        <Selecting AllowRowSelect="true" />
    </ClientSettings>

    <FilterMenu EnableImageSprites="False"></FilterMenu>

    <HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default"></HeaderContextMenu>

</telerik:RadGrid>





Maria Ilieva
Telerik team
 answered on 04 Jun 2014
1 answer
160 views
Hi guys. I just started to use Telerik control.

I have a RadGrid, when users click on the hyperlink, it will pop up and show the user list. I had it running smoothly with a form that using <asp:Content> with a master page. But I have to create another page that without the master page, so I only use normal <html> tag but the radopen is not showing the pop up. Please help.

CS Code
protected void gvHistory_ItemDataBound(object sender, GridItemEventArgs e)
        {
           GridDataItem item = (GridDataItem)e.Item;

                HyperLink hlink = (HyperLink)e.Item.FindControl("hlink");
                hlink.Attributes.Add("Onclick", " return radopen('frmViewUser.aspx?Role_ID=" + item["ROLE_ID"].Text + "','RadWindow1');");
}

ASPX
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <script type="text/javascript">

        function printWindow() {
            bV = parseInt(navigator.appVersion)
            if (bV >= 4) window.print()
        }

        function GridCreated(sender, args) {
            var scrollArea = sender.GridDataDiv;
            var dataHeight = sender.get_masterTableView().get_element().clientHeight;
            if (dataHeight < 250) {
                scrollArea.style.height = dataHeight + 17 + "px";
            }
        }

    </script>

    <style type="text/css">
        .RadWindow {top: 0px!important; left: 0px!important;}
    </style>
</head>
<body>




<form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    
    <div>
        <table>
                <tr>
                    <td>
                        <telerik:RadGrid ID="gvHistory" runat="server" AutoGenerateColumns="False" Width="100%" ExportSettings-Pdf-AllowPrinting="true"
                            PagerStyle-AlwaysVisible="false" CellSpacing="0" ShowFooter="False" Skin="Windows7" TableLayout="Auto" 
                            Font-Size="10px" GridLines="None" EnableLinqExpressions="False" OnItemDataBound="gvHistory_ItemDataBound">
                        <MasterTableView EnableNoRecordsTemplate="true" DataKeyNames="ID" ItemStyle-Wrap="True" HeaderStyle-Wrap="False"
                            Width="100%">
                            <Columns>
                                <telerik:GridBoundColumn DataField="DESCRIPTION" HeaderText="ICMS Status" HeaderTooltip="ICMS Status" UniqueName="DESCRIPTION">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="Approver" DataField="ROLE_NAME" 
                                    AllowFiltering="false">
                                    <ItemTemplate>
                                        <asp:HyperLink ID="hlink" runat="server" Text='<%# Eval("ROLE_NAME") %>' 
                                            Onclick="radopen('frmViewRoleUserform.aspx?Role_ID=" + '<%# Eval("ROLE_NAME") %>' + "','RadWindow1')"></asp:HyperLink>
                                        
                                    </ItemTemplate>
                                </telerik:GridTemplateColumn>                                    
                                <telerik:GridBoundColumn DataField="USER_NAME" HeaderText="Approved By" HeaderTooltip="Approved By">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="ACTION_TIME" HeaderText="Date" HeaderTooltip="Date" UniqueName="ACTION_TIME">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="COMMENTS" HeaderText="Comment" HeaderTooltip="Comment">
                                </telerik:GridBoundColumn>                                
                                <telerik:GridBoundColumn DataField="ROLE_ID" Display ="false" UniqueName="ROLE_ID">
                                </telerik:GridBoundColumn>                                
                            </Columns>
                        </MasterTableView>
                        <ClientSettings>
                            <Scrolling AllowScroll="False" SaveScrollPosition="True"  />
                            <ClientEvents OnGridCreated="GridCreated" />                               
                        </ClientSettings>
                        <PagerStyle Mode="NextPrevNumericAndAdvanced" />
                    </telerik:RadGrid>
                    </td>
                </tr>
            </table>
        <telerik:RadWindowManager ID="RadWindowManager1" runat="server" EnableShadow="true">
            <Windows>
                <telerik:RadWindow ID="RadWindow1" runat="server" ShowContentDuringLoad="false" Width="800px"
                Height="400px" Title="Role Users" Behaviors="Default" Left ="10" Top="10" >
                </telerik:RadWindow>
            </Windows>
        </telerik:RadWindowManager>
        </asp:Panel>        
        <br />
    </div>
</form>
    </body>
    </html>
Princy
Top achievements
Rank 2
 answered on 04 Jun 2014
4 answers
161 views
Is it possible to stack the aggregated items in the column footer?

What I am looking for is to display a number of aggregates (sum, avg, std dev) for certain columns that will appear vertically.
Phil
Top achievements
Rank 1
 answered on 04 Jun 2014
6 answers
196 views
Hi,

I have an asp.net 4.0 application that uses Radeditor. However, when I installed SSL certificate in IIS I'm getting XML Parsing Error in Firefox or just blank page in IE as shown in the picture. This only happens in pages with Radeditor in it.

When I uninstalled the certificate, the issue was gone and the pages worked flawlessly. Any Idea how to fix this?

I am using a Comodo SSL in IIS6.

Thanks
Ianko
Telerik team
 answered on 04 Jun 2014
3 answers
318 views
Hello,

We are using RadEditor (2014.1.225.40) & are encountering a serialization error(below) when setting up a large number of EditorLink entries (15,000+)

I know the 'right' answer is to NOT build up that much data to send to the browser, but I am looking to see if there is any short term workaround to try.


Please note:
We do ALREADY have an entry to setup the maximum in the web.config, but that does appear to apply to the editor instance - I'm guessing it has it's own instance.
<system.web.extensions>
<scripting>
<webServices>
<jsonSerialization maxJsonLength="2147483644"></jsonSerialization>
</webServices>
</scripting>
</system.web.extensions>

When I break on the error I see that in RadEditor.SerializeCollections, there is a _serializer instance that has a MaxJSONLength of 2097152.
(see attached image serializerSetting.gif)
Is there any config/small code change I can make to adjust that until I get a better fix in place?


Full Error:
Server Error in '/' Application.Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.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.InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.

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: 

[InvalidOperationException: Error during serialization or deserialization using the JSON JavaScriptSerializer. The length of the string exceeds the value set on the maxJsonLength property.]
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +532853
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat) +66
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +153
System.Web.Script.Serialization.JavaScriptSerializer.SerializeEnumerable(IEnumerable enumerable, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat) +127
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValueInternal(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +1306
System.Web.Script.Serialization.JavaScriptSerializer.SerializeValue(Object o, StringBuilder sb, Int32 depth, Hashtable objectsInUse, SerializationFormat serializationFormat, MemberInfo currentMember) +197
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, StringBuilder output, SerializationFormat serializationFormat) +28
System.Web.Script.Serialization.JavaScriptSerializer.Serialize(Object obj, SerializationFormat serializationFormat) +66
Telerik.Web.UI.RadEditor.SerializeCollections(IScriptDescriptor descriptor, JavaScriptSerializer jss) +912
Telerik.Web.UI.RadEditor.DescribeComponent(IScriptDescriptor descriptor) +1258
Telerik.Web.UI.RadWebControl.Telerik.Web.IControl.DescribeComponent(IScriptDescriptor descriptor) +10
Telerik.Web.UI.ScriptRegistrar.GetScriptDescriptors(Control control) +119
Telerik.Web.UI.RadEditor.GetScriptDescriptors() +26
Telerik.Web.UI.RadWebControl.System.Web.UI.IScriptControl.GetScriptDescriptors() +10
System.Web.UI.ScriptControlManager.RegisterScriptDescriptors(IScriptControl scriptControl) +128
Telerik.Web.UI.RadWebControl.RegisterScriptDescriptors() +90
Telerik.Web.UI.RadEditor.RegisterScriptDescriptors() +27
Telerik.Web.UI.RadWebControl.Render(HtmlTextWriter writer) +84
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.WebControls.WebControl.RenderContents(HtmlTextWriter writer) +10
System.Web.UI.WebControls.WebControl.Render(HtmlTextWriter writer) +32
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter writer) +216
System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +32
System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output) +53
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer) +40
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Control.Render(HtmlTextWriter writer) +10
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +128
System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +8
System.Web.UI.Page.Render(HtmlTextWriter writer) +29
System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +57
System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +100
System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +25
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1386
Ianko
Telerik team
 answered on 04 Jun 2014
3 answers
201 views
We've got a couple of oddities with RadEditor (Q1 2010 version).

Links:

1) In Design mode, the user enters a line of text
2) The user marks a single word in the text they just entered
3) The user sets a hyperlink on the word via the Hyperlink Manager.
4) User continues adding text
5) The user marks the word previously hyperlinked and presses "Delete" on the keyboard

Result:
In HTML View, there's an empty anchor <a href></a> tag where the word used to be.

Things we tried:
- If the user selects the word plus the whitespace character preceding the word, the anchor tag is properly removed
- If the user "backspaces" the word out, the anchor tag is also properly removed
- If the user marks the word and instead of pressing "Delete" starts typing a replacement text, the anchor tag is kept around the new text

It's our opinion that marking the word (shift + cursor keys) and pressing the "Delete"-Key should also remove the underlying anchor tag (if present).

Changing Attributes:

Scenario:
 We've got a Rad Editor on a page. The content is set from the Database. On postback, the application should check whether the user changed the content, and if yes, do some processing and update the database.

Observation:
We were setting the Rad Editor from the database with text containing a single anchor tag as follows:

.... <a href="http://www.sample.com" class="XYZ">Sample</a> ...

Without changing anything in the editor and forcing a postback, RadEditor gave us the following content back:

.... <a class="XZY" href="http://www.sample.com">Sample</a> ...

Being the good fellows we are, we take that, write it back into the database and load the page again. So this time we set the content of our rad editor to:

.... <a class="XZY" href="http://www.sample.com">Sample</a> ...

Again, without changing anything in the edtior, we cause a postback and lo and behold what do we get from Rad Editor:

.... <a href="http://www.sample.com" class="XYZ">Sample</a> ...

We've determined that this due to one of the default CONTENT FILTERS that Rad Editor uses. We managed to fix the problem by setting the ContentFilters property to "None", however this "fix" is less than perfect. Maybe you guys could look at which part of your javascript is flipping tag attributes around and make it stop?

Thanks.


Ianko
Telerik team
 answered on 04 Jun 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Shiori
Top achievements
Rank 2
Iron
Tien
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Rob
Top achievements
Rank 4
Bronze
Bronze
Iron
Geoff
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?