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

Hello,

I am working with a RadTreeView using a node template. It is databound against a datatable.

<TELERIK:RadTreeView ID="tvOrgChart" runat="server"
    DataValueField="staffmemberid" DataTextField="title" DataFieldID="staffmemberid" DataFieldParentID="supervisor">
    <NodeTemplate>
        <strong><%# Eval("casualname") %>,</strong> <em><%# Eval("title") %></em> <small>[<%# Eval("staffclassname") %>]</small>
    </NodeTemplate>
</TELERIK:RadTreeView>

 

My initial question was supposed to be how can I enable editing on this tree so that only the "title" attribute is edited. It turns out that by adding DataTextField="title", that this functionality is built in!! Pretty cool!

But I do have a problem. When the edit is complete, the node still displays the original text of the template, without any of the updates to the title field. There is a great Outlook-like example showing how to implement ClientNodeEditStart and ClientNodeEdited to restore a message counter after a rename.I attempted to use this pattern.

I want to get the original displayed text, save it, and, after the edit, replace the old title with the new title. Here is the problem... in the ClientNodeEditStart event, the .get_text() does not actually return the text that is displayed on the node! With DataTextField defined, it returns the value of the specified column. Without a text value defined, it returns "System.Data.DataRowView".

How can I get the HTML that is displayed by the node??

Joel

Joel Kraft
Top achievements
Rank 2
 answered on 07 Jul 2017
1 answer
115 views
I'm working on an asp.net project where i have a master page and content pages. Im getting an exception message when i place a timer on one of the content page which is ticking at a certain interval and rebinding the grid using rebind method. I have got  a RadScripManager placed on my master page. Im also using radajaxmanager for the timer.
Im using latest 2017 telerik controls and browser is IE version 11. i have tested my code with chrome and Firefox and no exception is occurring with the browsers,.
When i get an exception my page is zoom in automatically. Can you please guide me. Details of an exception is below

Unhandled exception at line 17198, column 28 in http://localhost:60682/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:b59ca51d-6c90-4be1-88fb-6dda83097045:ea597d4b:b25378d2:76254418;Telerik.Web.UI,+Version=2016.2.607.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:fb63f838-b932-4810-8e72-f1ca43eff960:16e4e7cd:f7645509:33715776:7c926187:8674cba1:88144a7a:b7778d6c:c08e9f8a:59462f1:a51ee93e:58366029:24ee1bba:f46195d3:ed16cbdc

0x80070057 - JavaScript runtime error: Invalid argument.

The line where im getting an exception 
Telerik.Web.UI.RadAjaxControl.prototype.updateHeadStyles [Telerik.Web.UI.WebResource.axd] Line 17198 Script
and exception line is 
}if(e[c].indexOf("{")!=-1){f.insertRule(e[c]+"}",f.cssRules.length);
Vessy
Telerik team
 answered on 07 Jul 2017
1 answer
241 views

I'm working on an asp.net project where i have a master page and content pages. Im getting an exception message when i place a timer on one of the content page which is ticking at a certain interval and rebinding the grid using rebind method. I have got  a RadScripManager placed on my master page. Im also using radajaxmanager for the timer.

Im using latest 2017 telerik controls and browser is IE version 11. i have tested my code with chrome and Firefox and no exception is occurring with the browsers,.

When i get an exception my page is zoom in automatically. Can you please guide me. Details of an exception is below

 

Unhandled exception at line 17198, column 28 in http://localhost:60682/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:b59ca51d-6c90-4be1-88fb-6dda83097045:ea597d4b:b25378d2:76254418;Telerik.Web.UI,+Version=2016.2.607.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:en-US:fb63f838-b932-4810-8e72-f1ca43eff960:16e4e7cd:f7645509:33715776:7c926187:8674cba1:88144a7a:b7778d6c:c08e9f8a:59462f1:a51ee93e:58366029:24ee1bba:f46195d3:ed16cbdc

0x80070057 - JavaScript runtime error: Invalid argument.

 

The line where im getting an exception 

Telerik.Web.UI.RadAjaxControl.prototype.updateHeadStyles [Telerik.Web.UI.WebResource.axd] Line 17198 Script

and exception line is 

}if(e[c].indexOf("{")!=-1){f.insertRule(e[c]+"}",f.cssRules.length);

 

Vessy
Telerik team
 answered on 07 Jul 2017
0 answers
119 views

I have attached a sample layout of a scheduler that i want to show the status change line and summary based on a SQL database table.

On the top is the timeline for one day.

left side are 4 status.

right side shows the summary for each status of on day.

The status change line is in  the center of this chart.

 

If Telerik scheduler can do it , or other controller which may able to do it?

 

Thanks,

Steve

Steve
Top achievements
Rank 1
 asked on 07 Jul 2017
5 answers
93 views
In order to create a new Local Resource file (RESX), I navigate to the Designer, and use the Tools --> Generate Local Resource option.  

The problem is that many of my telerik tags are getting rewritten during this process.  Is there a way to stop this?  

No standard ASP controls demonstrate this behavior - so I am wonder if this is something on the Telerik side?  

We do not use the designer view - except for this purpose - and I understand that it may just be inserting default attributes and tags that we did not write - but this adds to our code, and sometimes messes things up.

Is there a way to disable this - or a workaround?

For example, this:

<telerik:RadTextBox runat="server" ID="tCurrentAgency"  Width="200px" ReadOnly="True" SkinID="defaultText">
</telerik:RadTextBox>

becomes this:

<telerik:RadTextBox runat="server" ID="tCurrentAgency"
    Width="200px" ReadOnly="True" SkinID="defaultText" LabelCssClass="" LabelWidth="64px" meta:resourcekey="tCurrentAgencyResource1" Resize="None">
    <EmptyMessageStyle Resize="None" />
    <ReadOnlyStyle Resize="None" />
    <FocusedStyle Resize="None" />
    <DisabledStyle Resize="None" />
    <InvalidStyle Resize="None" />
    <HoveredStyle Resize="None" />
    <EnabledStyle Resize="None" />
</telerik:RadTextBox>


Ian
Top achievements
Rank 1
 answered on 06 Jul 2017
0 answers
270 views

Hello Friends,

   I am getting same old "Script control '' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors(). Parameter name: scriptControl " as soon as I write following code to enable ajax for the radgrid. 

<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgUploadedDocs">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgUploadedDocs" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>

 

I am not doing anything special here. All I have is main aspx page with master page and few user controls in it. One of the user controls is already having RadAjaxManager so I am using RajAjaxManagerProxy in my user control. Following is my full aspx page code. I would appreciate if someone can help me on this. 

 

<%@ Control Language="C#" AutoEventWireup="true" CodeFile="UploadDocument.ascx.cs" Inherits="UserControls_UploadDocument" %>
<%@ Register Src="~/UserControls/FormField.ascx" TagName="FormField" TagPrefix="uc" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajax" %>
 
 
<span id="uploadMessage" runat="server"  visible="true" class="formLabelAuto">The documents shown below are uploaded from this page only. You have to navigate to the specific page to view the documents on that page.</span>
<br />
<br />
 
 
 <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        function showHideOtherText() {
            document.getElementById('<%= txtDescription.ClientID %>').value = '';
        var selectElem = document.getElementById('<%= ddlUploadDocumentType.ClientID %>');
        var selectText = selectElem.options[selectElem.selectedIndex].text;
 
        if (selectText.toUpperCase() == 'OTHER') {
            document.getElementById('<%= txtDescription.ClientID %>').removeAttribute('disabled');
        }
        else {
            document.getElementById('<%= txtDescription.ClientID %>').setAttribute('disabled');
        }
 
    }
        </script>
</telerik:RadCodeBlock
 
<telerik:RadAjaxManagerProxy ID="AjaxManagerProxy1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="rgUploadedDocs">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgUploadedDocs" LoadingPanelID="RadAjaxLoadingPanel1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManagerProxy>
 
 
<div style="text-align:center">
        
 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Transparency="50"
        BackColor="#E0E0E0" InitialDelayTime="500">
        <asp:Image ID="imgLoading" Style="margin-top: 100px" runat="server" ImageUrl="~/Images/Loading.gif"
            BorderWidth="0px" AlternateText="Loading..." />
    </telerik:RadAjaxLoadingPanel>
 
    <telerik:RadGrid RenderMode="Lightweight" ID="rgUploadedDocs" runat="server" Width="100%" Enabled ="true"
        FilterItemStyle-BackColor="#e6e6e6" FilterItemStyle-BorderStyle="Solid" OnNeedDataSource="rgUploadedDocs_NeedDataSource"
         OnItemDataBound="rgUploadedDocs_ItemDataBound" OnItemCommand="rgUploadedDocs_ItemCommand" CssClass="gridViewSmallFont">
        <HeaderStyle CssClass="gridViewHeader" />
        <PagerStyle Mode="NextPrevAndNumeric" />
        <ItemStyle CssClass="gridViewRow" />
        <AlternatingItemStyle CssClass="gridViewAltRow" />
        <SelectedItemStyle CssClass="gridViewSelected" />
        <MasterTableView AllowSorting="true" PageSize="10" AllowPaging="True" Width="100%" AutoGenerateColumns="false" CommandItemDisplay="None" DataKeyNames="DOCUMENT_ID"
             NoMasterRecordsText="No uploaded documents found." AllowFilteringByColumn="false" AllowMultiColumnSorting="true" ShowHeadersWhenNoRecords="true">
        <CommandItemSettings ShowAddNewRecordButton="false" ShowRefreshButton="false" /> 
        <SortExpressions>
          <telerik:GridSortExpression FieldName="LAST_MODIFIED_DATE_TIME" SortOrder="Descending" />
        </SortExpressions>      
        <Columns>
            <telerik:GridTemplateColumn HeaderText="Document Type" SortExpression="Name" AllowFiltering="false">
                <ItemTemplate>
                    <asp:Label runat="server" ID="lblDocumentType"></asp:Label>
                </ItemTemplate>
            </telerik:GridTemplateColumn
            <telerik:GridBoundColumn  UniqueName="FileName" DataField="FILE_NAME" HeaderText="File Name" AllowFiltering="false">
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="UploadDate" DataField="LAST_MODIFIED_DATE_TIME" HeaderText="Upload Date" DataFormatString="{0:d}" AllowFiltering="false">
             
            </telerik:GridBoundColumn>
            <telerik:GridBoundColumn UniqueName="UserName" DataField="Username" HeaderText="Username" AllowFiltering="false">
            </telerik:GridBoundColumn>
            <telerik:GridTemplateColumn HeaderText="Osolete" SortExpression="IS_OBSOLETE" AllowFiltering="false">
                <ItemTemplate>
                    <asp:CheckBox ID="rdchkObsolete" runat="server" ToolTip="Obsolete" AutoPostBack="true" OnCheckedChanged="rdchkObsolete_CheckedChanged"/>
                </ItemTemplate>
            </telerik:GridTemplateColumn
            <telerik:GridTemplateColumn AllowFiltering="false">
                <ItemTemplate>
                    <asp:ImageButton ID="imgView" ImageUrl="~/Images/search.png" runat="server" ToolTip="View" CommandName="Edit" AlternateText="View" />
                </ItemTemplate>
            </telerik:GridTemplateColumn
            <telerik:GridTemplateColumn AllowFiltering="false">
                <ItemTemplate>
                    <asp:ImageButton ID="imgCancel" ImageUrl="~/Images/cancel.png" runat="server" CommandName="Delete" ToolTip="Delete"
                        CommandArgument='<%# DataBinder.Eval(Container.DataItem, "DOCUMENT_ID") %>' AlternateText="Delete" />
                </ItemTemplate>
            </telerik:GridTemplateColumn
        </Columns>
        </MasterTableView>
    </telerik:RadGrid>
 
    <br />
    <br />
    <table border="0" style="border-collapse: collapse; border-spacing: 0"  role="presentation">
        <tr>
            <td> </td>
            <td>
                <asp:FileUpload id="filUploadFile" runat="server" Width="400px" size="100" />
            </td>
        </tr>
        <tr><td> </td><td> </td></tr>
         <tr runat="server" id="trUploadDocumentType">
            <td style="text-align:right"><span class="formLabelAuto">Document Type:</span></td>
            <td style="text-align:left"><asp:DropDownList runat="server" ID="ddlUploadDocumentType" CssClass="formField220" OnClientClick="showHideOtherText();"></asp:DropDownList></td>
         </tr>
         
        <tr><td colspan="2"> </td></tr>
        <tr><td colspan="2"><asp:ValidationSummary ID="vsUpdateDocument" runat="server" DisplayMode="SingleParagraph" ValidationGroup="valUpdateDocument" /></td></tr>
         
        <tr style="vertical-align:top">
            <td>
                <span class="formLabelSmall">Description</span>
            </td>
            <td>
                <asp:TextBox ID="txtDescription" runat="server" Rows="5" CssClass="formFieldLarge" TextMode="MultiLine" MaxLength="500" />
            </td>
        </tr>
    </table>
    <br />
    <asp:Button id="UploadButton" Text="Upload file" OnClick="UploadButton_Click" runat="server" CssClass="buttonBox"
        ValidationGroup="valUpdateDocument" /> 
    <p><b><asp:Label ID="lblStatusMsg" runat="server" Width="100%" Style="word-wrap: normal; word-break: break-all;"/></b></p
</div>
Devang
Top achievements
Rank 1
 asked on 06 Jul 2017
4 answers
98 views

I just updated my telerik controls, and a previously working uploader is now throwing an error. When I upload a file, it proceeds to try an upload but then throws the JS error below. I can't find a solution, any ideas?

Unhandled exception at line 2509, column 1 in http://localhost/Portal/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl00_ContentBody_ScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:en-US:ab0488d2-2a95-4bc4-9f11-51ca4952d5f7:ea597d4b:b25378d2;Telerik.Web.UI:en-US:f8fbf82e-0050-4b46-80b2-4fd09c29f9d6:16e4e7cd:f7645509:22a6274a:24ee1bba:33715776:52af31a4:5fa37e7e
0x800a139e - JavaScript runtime error: Exception thrown and not caught

Vessy
Telerik team
 answered on 06 Jul 2017
0 answers
96 views

Greetings,

 

I changed InlineInsertTemplate to contain 2 buttons(for now) and i would like, depending on which i have clicked, to hide certain fields from Advanced Insert Template.

 

So i have the code :

 

    <InlineInsertTemplate>
              
                <div id="InlineInsertTemplate" class="rsCustomAppointmentContainer">
                    <div class="col-md-6">
                 <asp:LinkButton ID="LinkButton1" runat="server" CommandName="More" CssClass="rsButton" BackColor="Gray" Text="Option A">
               
       </asp:LinkButton></div>
    <div class="col-md-6">
       <asp:LinkButton ID="LinkButton2" runat="server" CommandName="More"  CssClass="rsButton" BackColor="Gray" Text="Option B">
       </asp:LinkButton></div>
                    </div>
            </InlineInsertTemplate>

 

I have tried to get SenderID in RadScheduler1_FormCreated function, but had no luck with that.

 

Anyone knows the solution for this issue?

If its possible to create two advanced insert forms that would`ve helped as well ,and show one depending on the button i cliked, but the whole point is to get a button id in some of these events

 

Thanks forward!

 

 

            

S4v1n
Top achievements
Rank 1
 asked on 06 Jul 2017
0 answers
101 views

Hi,

 

can you tell me how to color a full row when I hover ? 

Like my attached file, when I was "select" a row is okay, but when I was"hover" a row, rows what has background-color are not okay.

I want coloring a full row when I hovering..

Any reply could be good for me.. 

thanks.. 

yi
Top achievements
Rank 1
 asked on 06 Jul 2017
1 answer
134 views
I'm trying to set the height of a reportviewer inside a RadPageView of a radwindow to fit the height of the window but if I put something light height="100%" it doesnt work at all and if a change it to a a constant height it uses that height as a margin and produces the effect in the attached image, But if I move or shake the radwindow a little bit it arranges in the way it's supposed to be.
I've already tried stuff on this thread http://www.telerik.com/forums/how-to-set-reportviewer-auto-height-d26da08c4489 but it was useless. Any idea how to solve it?
Jaime
Top achievements
Rank 1
 answered on 05 Jul 2017
Narrow your results
Selected tags
Tags
+? more
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Boardy
Top achievements
Rank 2
Veteran
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
ivory
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
ClausDC
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?