Telerik Forums
UI for ASP.NET AJAX Forum
7 answers
590 views
Hi,
I have used RadEditor in my project and created a demo page using the following HTML and  toolkit.xml
Error is  "Uncaught TypeError: Cannot read property 'length' of undefined "

HTML is :

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="test.aspx.cs" Inherits="test" %>


<%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script language="javascript" type="text/javascript">
        function OnClientShow(editor, args) {
            //alert(editor.get_id());
            editor.onParentNodeChanged();
            var style = editor.get_contentArea().style;
            style.backgroundImage = "none";
            style.backgroundColor = "white";
            style.minHeight = "100px";
            //style.min-height = "200px";
        }
        function loadGallery(s) {
            alert(s);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
        </Scripts>
    </telerik:RadScriptManager>
    <div>
        <%-- AutoResizeHeight="True" 
    EditModes="Design, Html" ContentAreaMode="Div" ContentFilters="None" ToolsFile="~/toolfile.xml" Runat="server" 
    min-height="200px" OnClientLoad="OnClientShow" Height="100%" Width="99%" --%>
        <asp:UpdatePanel ID="UpdatePanel1" runat="server">
            <ContentTemplate>
                <telerik:RadEditor ID="RadEditor1"  AutoResizeHeight="True" 
    EditModes="Design, Html" ContentAreaMode="Div" ContentFilters="None" ToolsFile="~/toolfile.xml" Runat="server" 
    min-height="200px" OnClientLoad="OnClientShow" Height="100%" Width="99%">
                </telerik:RadEditor>
                
                <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" />
            </ContentTemplate>
        </asp:UpdatePanel>
    </div>
    </form>
</body>
</html>

When i click on button then it will show an error on in javascript and "Font-size" and "Font-name" goes disable .
Please reply . I am waiting for answer.


Sailaja
Top achievements
Rank 1
 answered on 24 May 2017
3 answers
149 views
What could be the meaning of this error. "Clone error. No Target element specified". Comes when I bind data using webservice binding, the error comes in Month View whenever more option is displayed
Doug
Top achievements
Rank 1
 answered on 23 May 2017
1 answer
152 views

I am utilizing Kendo 2016.3.1028, and on my webpage I need to use som tools that utilize an older version of jquery than kendo is utilizing.

I import the older version of Jquery through a partial view, which also contains the code for the other tools.

Once I import the older jquery version, however, my kendo objects, stop working. 

My my treeview dataItems apparantly stop existing, and my tabPages stop switching etc. 

Is there a way to make my kendo objects "survive" the importation of another, older version of Jquery?

Tsvetina
Telerik team
 answered on 23 May 2017
2 answers
654 views

My header tag:

1.<header>
2.  <link type="text/css" rel="stylesheet" href="../Css/bootstrap.min.css" />
3.  <link type="text/css" rel="stylesheet" href="../Css/font-awesome.min.css" />
4.  <link type="text/css" rel="stylesheet" href="../Css/StyleSheet.css" />
5.  <link type="text/css" rel="stylesheet" href="<%=Configuration.GetSetting("BrandingUrl") %>"  />
6.</header>

 When I enable CDN in web.config, Telerik css files are added between lines 5 and 6, However I need line 5  (My branding file containing some Telerik overrides) to be the last line.

I tried using the RadStyleSheetManager which provides ordering capabilities but since lines 2 and 3 are actually fully qualified URLs, I could not find a way to combine URLs and static files using the control. 

How would I be able to achieve this short of adding each [RadControl].css file I use in my Webform application.

 

Michael
Top achievements
Rank 2
 answered on 23 May 2017
1 answer
750 views
I want to develop a web based dynamic query builder interface for reporting module in my application, where in user can select columns and provide conditions to build a query for a report and save that query, later that query belonging to that report can be executed to display results. So my question is, does telerik  provide API to help build such an interface, there is query builder in report designer but can but can we also have API for it to build such web based query builder.
Stef
Telerik team
 answered on 23 May 2017
5 answers
222 views

Hi,

I have javascript which gets call on client click from modal popup extender. When I click on OK button in confirm dialog box AjaxLoadingPanel animation not spinning.

Here is my javascript:

<telerik:RadScriptBlock ID="RadScriptBlock1" runat="server">
<script type="text/javascript">
function DateSelected(sender, eventArgs) {
sender.get_textBox().focus();
}
</script>
<script type="text/javascript">
var currentLoadingPanel = null;
var currentUpdatedControl = null;
function OnClientClick() {
var txttext1 = document.getElementById('<%=txtComments.ClientID%>');
if (txttext1.value != "") {
$find("ModalBehaviour").hide();
currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
currentUpdatedControl = "<%= mainPanel.ClientID %>";
currentLoadingPanel.show(currentUpdatedControl);
return true;
}
else {
if (confirm("Are you sure you want to proceed without comments ?")) {
$find("ModalBehaviour").hide();
currentLoadingPanel = $find("<%= RadAjaxLoadingPanel1.ClientID %>");
currentUpdatedControl = "<%= mainPanel.ClientID %>";
currentLoadingPanel.show(currentUpdatedControl);
return true; }
else {
$find("ModalBehaviour").hide();
return false; }
}
}

</script>

Here is loading Panel:

<telerik:RadScriptManager ID="ScriptManager1" runat="server" />
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
<AjaxSettings>
<telerik:AjaxSetting AjaxControlID="mainPanel">
<UpdatedControls>
<telerik:AjaxUpdatedControl ControlID="mainPanel" LoadingPanelID="RadAjaxLoadingPanel1" />
</UpdatedControls>
</telerik:AjaxSetting>
</AjaxSettings>
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" EnableSkinTransparency ="true" runat="server" Skin="Office2010Blue">
</telerik:RadAjaxLoadingPanel>

This is part of the MainPanel:

<asp:Panel ID="mainPanel" runat="server">
<telerik:RadPanelBar ID="formPanel" runat="server" Width="99%" ExpandMode="MultipleExpandedItems" Skin="Forest" EnableEmbeddedSkins="false" BackColor="#2D6193" >
<Items>
<telerik:RadPanelItem Expanded="true" Text="PRINCIPAL PER SESSION REQUEST APPLICATION FORM " runat="server" Selected="true" Font-Bold="true" Font-Size ="13" Font-Names ="Verdana" ForeColor="white" >
<Items>
<telerik:RadPanelItem Value="principalForm" runat="server" Height="75">
<ItemTemplate>
<table>
<tr>
<asp:Panel ID="validationPanel" runat="server" Visible="false">
<td >
<fieldset style="width: 700px; height: 230px; margin-bottom: 10px;">
<legend style="padding-top:20px;">Please correct the following:</legend>
<asp:ValidationSummary ID="validationSummary1" runat="server" DisplayMode="BulletList" CssClass="validationsummary" />
<asp:CustomValidator ID="customValidator1" runat ="server" Display="none" OnServerValidate="customValidator1_ServerValidate" ></asp:CustomValidator>
</fieldset>
</td>
</asp:Panel>
</tr>
</table>

 

And finally modal popup extender:

<asp:Button ID="btnShow1" runat="server" Style="display: none; position: relative" Text="Show Modal Popup" />
<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server" BackgroundCssClass="modalBackground"
DropShadow="true" PopupControlID="ApprPanel" TargetControlID="btnShow1" BehaviorID="ModalBehaviour"></cc1:ModalPopupExtender>
<asp:Panel ID="ApprPanel" runat="server" BackColor="White" BorderStyle="Solid" BorderWidth="2px"
Height="200px" Style="display: none; color:#b0c4de;" Width="570px" >
<div>
<table>
<tr >
<td style="border-right-style: none; border-left-style: none; border-bottom-style: none;
padding:5px;border-top-color: #abd971; background-color: #284A6D; text-align: center;">
<asp:Label ID="lblError" runat="server" Text="Please Enter Comments(optional)"
Font-Bold="True" Font-Size="Large" ForeColor="White"></asp:Label>
</td>
</tr>
<tr>
<td align="center" style="margin-top: 10px; vertical-align:middle;">
<asp:TextBox ID="txtComments" runat="server" Width="550px" onKeyUp="Count(this,250)" onChange="Count(this,250)"
Height="113px" TextMode="MultiLine"></asp:TextBox>
</td>
</tr>
<tr>
<td align="center" style="height: 39px">
<br />
<asp:Button ID="submitComments" runat="server" Text="Submit" CssClass="button" OnClick="submitComments_Click" OnClientClick="return OnClientClick()" />
</td>
</tr>
</table>
</div>
</asp:Panel>

 

Please help me to resolve this issue.

Thanks so much.

Rumen
Telerik team
 answered on 23 May 2017
2 answers
281 views

Hi:

I have a radgrid with auto ops. Add/edit using template. Update works but Insert get this error:

"Get error when insert new record as "'ddlInstType' has a SelectedValue which is invalid because it does not exist in the list of items.
Parameter name: value"

Hopefully you give me a hint to fix this error.

Thank you.

 

 

Codes:

<telerik:RadGrid ID="rgInst" runat="server" CellSpacing="0" GridLines="None" RenderMode="Lightweight"
      AllowAutomaticUpdates="True" AllowAutomaticInserts="True" AllowAutomaticDeletes="true" AutoGenerateColumns="false" DataSourceID="sdsInst"
      OnItemCreated="rgInst_ItemCreated" OnItemInserted="rgInst_ItemInserted" OnItemUpdated="rgInst_ItemUpdated" OnItemDeleted="rgInst_ItemDeleted" OnItemCommand="rgInst_ItemCommand">
      <PagerStyle Mode="NextPrevNumericAndAdvanced" />
      <GroupingSettings CaseSensitive="false" />
      <MasterTableView AutoGenerateColumns="false" DataSourceID="sdsInst" DataKeyNames="InstID, InstTypeId" CommandItemDisplay="Top" EditMode="EditForms">
        <Columns>
          <telerik:GridEditCommandColumn UniqueName="EditCommandColumn" />          
          <telerik:GridBoundColumn UniqueName="InstName" DataField="InstName" HeaderText="Institution" />
          <telerik:GridBoundColumn DataField="InstOffice" HeaderText="School/Dept." />
          <telerik:GridBoundColumn UniqueName="InstTypeDesc" DataField="InstTypeDesc" HeaderText="Campus Type" />
          <telerik:GridButtonColumn Text="Deactivate" CommandName="Delete" ConfirmText="Deactivate this record?" />
        </Columns>

        <EditFormSettings EditFormType="Template">
          <FormTemplate>
            <br />
                  <table class="tableW100">
                    <tr>
                      <td class="td30R">Institution name:</td>
                      <td class="td70L">
                        <asp:TextBox ID="tbInstName" runat="server" CssClass="tbW100" Text='<%# Bind("InstName") %>' />
                      </td>
                    </tr>
                    <tr>
                      <td class="td30R">School/Department:</td>
                      <td class="td70L">
                        <asp:TextBox ID="tbInstOffice" runat="server" CssClass="tbW100" TextMode="MultiLine" Text='<%# Bind("InstOffice") %>' />
                      </td>
                    </tr>
                    <tr>
                      <td class="td30R">Campus Type:</td>
                      <td class="td70L">
                        <asp:DropDownList ID="ddlInstType" CssClass="tbW100" runat="server" DataSourceID="sdsInstType" DataTextField="InstTypeDesc" DataValueField="InstTypeID" SelectedValue='<%# Bind("InstTypeID") %>' />
                      </td>
                    </tr>                    
              <tr>
                <td colspan="2" class="tr4Btn">
                  <asp:Button ID="btnUpdate" CssClass="flatbtnFlexSmall" Text='<%# (Container is GridEditFormInsertItem) ? "Insert" : "Update" %>' runat="server" CommandName='<%# (Container is GridEditFormInsertItem) ? "PerformInsert" : "Update" %>' />&nbsp;
                  <asp:Button ID="btnCancel" CssClass="flatbtnFlexSmall" Text="Cancel" runat="server" CausesValidation="False" CommandName="Cancel" />
                </td>
              </tr>             
          </FormTemplate>
        </EditFormSettings>
      </MasterTableView>
    </telerik:RadGrid>

<asp:SqlDataSource ID="sdsInst" runat="server" ConnectionString="<%$ ConnectionStrings:MainDB %>"
    SelectCommand="sprInstitutionGet" SelectCommandType="StoredProcedure"
    UpdateCommand="sprInstitutionUpdate" UpdateCommandType="StoredProcedure"
    InsertCommand="sprInstitutionAdd" InsertCommandType="StoredProcedure"
    DeleteCommand="sprInstitutionDeactivate" DeleteCommandType="StoredProcedure">

    <InsertParameters> {...}
    </InsertParameters>

    <UpdateParameters>{...}
    </UpdateParameters>

    <DeleteParameters>{...}
    </DeleteParameters>

 </asp:SqlDataSource>

<asp:SqlDataSource ID="sdsInstType" runat="server" ConnectionString="<%$ ConnectionStrings:MainDB %>" SelectCommand="sprInstitutionTypeGet" SelectCommandType="StoredProcedure" />

 

d-cpt
Top achievements
Rank 2
 answered on 23 May 2017
2 answers
61 views

Not sure what is causing this, but the following code is being added at the bottom of the HTML whenever I add an image to my RadEditor control and save the content (see below):

Can anyone tell me how to keep this from happenning?

<span style="border-radius: 2px; text-indent: 20px; width: auto; padding: 0px 4px 0px 0px; text-align: center; font: bold 11px/20px 'Helvetica Neue',Helvetica,sans-serif; color: #ffffff; background: #bd081c url('data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGhlaWdodD0iMzBweCIgd2lkdGg9IjMwcHgiIHZpZXdCb3g9Ii0xIC0xIDMxIDMxIj48Zz48cGF0aCBkPSJNMjkuNDQ5LDE0LjY2MiBDMjkuNDQ5LDIyLjcyMiAyMi44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OS43NDEsMTguMTQxIDkuNTIsMTkuMDIzIDkuNDc3LDE5LjIwMyBDOS40MiwxOS40NCA5LjI4OCwxOS40OTEgOS4wNCwxOS4zNzYgQzcuNDA4LDE4LjYyMiA2LjM4NywxNi4yNTIgNi4zODcsMTQuMzQ5IEM2LjM4NywxMC4yNTYgOS4zODMsNi40OTcgMTUuMDIyLDYuNDk3IEMxOS41NTUsNi40OTcgMjMuMDc4LDkuNzA1IDIzLjA3OCwxMy45OTEgQzIzLjA3OCwxOC40NjMgMjAuMjM5LDIyLjA2MiAxNi4yOTcsMjIuMDYyIEMxNC45NzMsMjIuMDYyIDEzLjcyOCwyMS4zNzkgMTMuMzAyLDIwLjU3MiBDMTMuMzAyLDIwLjU3MiAxMi42NDcsMjMuMDUgMTIuNDg4LDIzLjY1NyBDMTIuMTkzLDI0Ljc4NCAxMS4zOTYsMjYuMTk2IDEwLjg2MywyNy4wNTggQzEyLjA4NiwyNy40MzQgMTMuMzg2LDI3LjYzNyAxNC43MzMsMjcuNjM3IEMyMS45NSwyNy42MzcgMjcuODAxLDIxLjgyOCAyNy44MDEsMTQuNjYyIEMyNy44MDEsNy40OTUgMjEuOTUsMS42ODYgMTQuNzMzLDEuNjg2IiBmaWxsPSIjYmQwODFjIj48L3BhdGg+PC9nPjwvc3ZnPg==') no-repeat scroll 3px 50% / 14px 14px; position: absolute; opacity: 1; z-index: 8675309; display: none; cursor: pointer; border: medium none;">Save</span>

cdikmen
Top achievements
Rank 1
 answered on 23 May 2017
1 answer
183 views

Good afternoon,

I have Radwindow in my HTML :

<telerik:RadWindow ID="RadWindow1" runat="server" Modal="true" Animation="Fade" AutoSizeBehaviors="Default" Width="550px" Height="250px"
VisibleStatusbar="false" VisibleTitlebar="true" AutoSize="false" Behaviors="None" Skin="Outlook" Title="SCHEDULE ERROR(S)" >
<ContentTemplate>

<p style="width: 90%; height: 15px; font-size:medium; font-weight:bold;color:Red;" >
The following should be corrected in Galaxy:
</p>
<asp:Panel ID="prepsPanel" runat="server">
<div id="prepsDays" runat="server" style="width: 90%; height: 15px; font-size:small; font-weight:bold;color:Navy; padding-bottom:5px; text-align:left;" >
<asp:BulletedList ID="BulletedList8" runat="server" BulletStyle="Disc">
<asp:ListItem>Schedule does not correspond to num of preps(days)</asp:ListItem>
</asp:BulletedList>
</div>
</asp:Panel>
<asp:Panel ID="sdatePanel" runat="server">
<div id="stDate" runat="server" style="width: 90%; height: 15px; font-size:small; font-weight:bold;color:Navy; padding-bottom:5px; text-align:left;" >
<asp:BulletedList ID="BulletedList9" runat="server" BulletStyle="Disc">
<asp:ListItem>Start Date must be valid work day</asp:ListItem>
</asp:BulletedList>
</div>
</asp:Panel>


</ContentTemplate>
</telerik:RadWindow>

Based on criteria in code behind I want to make it invisible like this:

if (schcnt > 0 || stdcnt > 0 || endcnt > 0 || trmcnt > 0 || jobcnt > 0 || dupcnt > 0 || loccnt > 0 || fundcnt > 0)
{

string script = "function f(){$find(\"" + RadWindow1.ClientID + "\").show(); Sys.Application.remove_load(f);}Sys.Application.add_load(f);";
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "key", script, true);


if (schcnt == 0)
prepsPanel.Visible = false;

if (stdcnt == 0)
sdatePanel.Visible = false;

But apparently it is not working. Both error showing in popup screen. Should be only one error on the popup screen.

Please help me to resolve this issue.

Thanks.

Vitaly.

                           

Marin Bratanov
Telerik team
 answered on 23 May 2017
2 answers
142 views
I use Material skin width RadPanelBar.
When i expand, i get gray top border and bottom border. How remove that?
See attached Picture....
Ivan Zhekov
Telerik team
 answered on 23 May 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?