Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
770 views
I need to run some javascript code every time on page load, after Telerik Ajax controls are rendered on client. I tried to use this code:
Sys.Application.add_load(SetFocusToField);

function SetFocusToField() {
 
    if (indexToFocus == 0 && controlToFocus) {
        controlToFocus.focus();
        indexToFocus++;
    }
}
It works fine for the first time (regular page load) but on a partial postback this code doesn't run. I understand why it doesn't work but how can I call this javascript function on partial postbacks?

I tried to use RegisterStartupScript but it doesn't work for me too :(

string scriptFocus = @"
     
    ResetIndexOnFocus = 0;
    SetFocusToField();
 
";
ScriptManager.RegisterStartupScript(this, this.GetType(), "scriptFocus", scriptFocus, true);


Thank you in advance!
msigman
Top achievements
Rank 2
 answered on 11 Dec 2013
1 answer
95 views
Can't add text inside Radeditor (Design) in IE 9, 10 after re-appending radedtior to a new div 

Scenario to reproduce:

 <div id="prev"><telerik:RadEditor ID="RadEditor1" runat="server" ></telerik:RadEditor></div>
        
 <div style="height:200px;">some text...</div>

 <div id="next"></div>

 <div id="btn">click</div>

  <script type="text/javascript">
        $(function () {
            $("#btn").click(function(){
                $("#next").append($("#prev"));
            });
        });
    </script>



1. After clicking on "click" (button), the div (id="prev") which contains the editor is being append to div (id="next") (according to jquery script).
2. It's impossible to add text inside the editor (Design) in IE 9,10 (it works fine in chrome).
Ianko
Telerik team
 answered on 11 Dec 2013
4 answers
255 views
Hi,
We are writing a new version of our software using C# and Telerik tools.  In this case we have HTML content stored in the database that is being migrated and read into a RadEditor.  The issue seems to be when the content was created as a HTML Table.  Is there   An example is below:

<TABLE style="WIDTH: 503pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=670 border=0 x:str>
<COLGROUP>
<COL style="WIDTH: 34pt; mso-width-source: userset; mso-width-alt: 1645" width=45>
<COL style="WIDTH: 469pt; mso-width-source: userset; mso-width-alt: 22857" width=625>
<TBODY>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl26 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; WIDTH: 503pt; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" width=670 colSpan=2 height=17><STRONG><FONT face=Arial size=2>Roof Inspection, 1 
  
Year:</FONT></STRONG></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent" height=17><STRONG><FONT face=Arial size=2></FONT></STRONG></TD>
<TD class=xl24 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: 
  
transparent"><STRONG><FONT face=Arial size=2></FONT></STRONG></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent" height=17><STRONG><FONT face=Arial size=2></FONT></STRONG></TD>
<TD class=xl24 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: 
  
transparent"><STRONG><FONT face=Arial size=2></FONT></STRONG></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17><FONT face=Arial size=2>Note: Use caution whenever working on a 
  
roof.<SPAN style="mso-spacerun: yes">  </SPAN>Ensure all fall arrest procedures are followed.</FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl25 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent" height=17><FONT face=Arial size=2></FONT></TD>
<TD class=xl24 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: 
  
transparent"><FONT face=Arial size=2></FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent" height=17 x:str="( ) "><FONT size=2><FONT face=Arial>( )<SPAN style="mso-spacerun: 
  
yes"> </SPAN></FONT></FONT></TD>
<TD class=xl24 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; BACKGROUND-COLOR: 
  
transparent"><FONT face=Arial size=2>Ensure the roof area is clean and free of debris, nails, scraps of metal and plant growth on the 
  
roof.</FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17 x:str="( ) Examine metal flashings, cappings, and metal siding for 
  
wind damage, corrosion, loose "><FONT size=2><FONT face=Arial>( ) Examine metal flashings, cappings, and metal siding for wind damage, 
  
corrosion, loose<SPAN style="mso-spacerun: yes"> </SPAN></FONT></FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17><FONT face=Arial size=2>joints or defective caulking.</FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17><FONT face=Arial size=2>( ) Check pitch pockets and machinery bases 
  
for damage.</FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17><FONT face=Arial size=2>( ) Examine roof surface for deterioration, 
  
water infiltration, or cracking.</FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17><FONT face=Arial size=2>( ) Check that all roof drains are 
  
clear.</FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17><FONT face=Arial size=2>( ) Check for poor drainage.</FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17><FONT face=Arial size=2>( ) Check all roof anchors.</FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17><FONT face=Arial size=2>( ) Check parapets for open mortar joints, 
  
capping.</FONT></TD></TR>
<TR style="HEIGHT: 12.75pt" height=17>
<TD class=xl27 style="BORDER-RIGHT: #c0c0c0; BORDER-TOP: #c0c0c0; BORDER-LEFT: #c0c0c0; BORDER-BOTTOM: #c0c0c0; HEIGHT: 12.75pt; 
  
BACKGROUND-COLOR: transparent; mso-ignore: colspan" colSpan=2 height=17><FONT face=Arial size=2>( ) Check all skylights for cracks, damaged 
  
flashing or caulking.</FONT></TD></TR></TBODY></TABLE>

When this is put into a htm file, it looks fine, but in the editor it looks like the attached Roof Inspection.jpg file.

The Editor (leaving out Tools and Modules) is defined as below:

<telerik:RadEditor ID="DescriptionEditor" Runat="server" 
                    Width="650px" Height="355px"
                    EditModes="Design, Preview"
                    EnableResize="false"
                    StripFormattingOnPaste="All" 
                    SkinID="DefaultSetOfTools"
                    OnClientCommandExecuting="OnClientCommandExecuting" 
                    >

Thanks for your help,
Dan Norton
Marin Bratanov
Telerik team
 answered on 11 Dec 2013
7 answers
123 views
How do I apply styling to the displayed RadRecurrenceEditor so it will accomplish the following:
1.  Remove the spacing so the controls are shifted up.
2.  Display all of the days on a single line.



Thank You in Advance!
Boyan Dimitrov
Telerik team
 answered on 11 Dec 2013
1 answer
69 views
Can someone help me map out in my brain why Kendo is better than ASPNET AJAX controls?

It is my understanding that using Kendo, is really the same as including a bunch of jquery libraries in your web page and then using them on the page. And how do they ensure you have purchased a license and havent simply downloaded the source and included it in your site?

So, doesn't that introduce the same problem I am currently dealing with on an MVC web site I took over from another developer?
On that site, they have over 2 MB of css and js files included on every web page.
Only a small fraction of the code will ever be used.
I realize there are some things I can do to make that situation better- move the .js links to the bottom of the page, minimize the files, remove unused ones etc... but it still seems inifficient to me.

When using server controls, if my understanding is correct- doesnt a server control automatically push out ONLY the javascript required for the control to work resulting in a much smaller footprint?


Marin Bratanov
Telerik team
 answered on 11 Dec 2013
3 answers
176 views
I tried to install the trial version of RadControls for ASP.NET AJAX on a Windows 2008 R2 server, but failed. The errors I came aross are attached.

Thanks.
Petar
Telerik team
 answered on 11 Dec 2013
1 answer
120 views
I have a Telerik ultimate license for Q1 2012

I have done strictly ASP.NET Ajax dev so far but I am currently working on an MVC project.
Can I use the versions I have with MVC?

MVC: 4
Entity framework: 6

Telerik Extensions for ASP.net MVC 2012.1.214
Telerik Web.UI 2012.1.215
Marin Bratanov
Telerik team
 answered on 11 Dec 2013
7 answers
77 views
I am  observing this. I had to hide first 2 of three elements and though apparently it seemed to be working but not actually, From the screen shot attached, instead getting the value, "value3" I am getting "value1"
<telerik:RadRibbonBar ID="RadRibbonBar1" runat="server"
            EnableQuickAccessToolbar="False" RenderInactiveContextualTabGroups="False"
            SelectedTabIndex="-1" Skin="Windows7" onmenuitemclick="RadRibbonBar1_MenuItemClick">
            <telerik:RibbonBarTab>
            <telerik:RibbonBarGroup>
            <Items>
            <telerik:RibbonBarMenu ID="rbmCaseCloneOptions" ViewStateMode="Disabled" Text="Telerik Raid">
                                                    <Items>
                                                        <telerik:RibbonBarMenuItem ID="rbmi_Item1" ViewStateMode="Disabled" Text="text 1" Value="value1"></telerik:RibbonBarMenuItem>
                                                        <telerik:RibbonBarMenuItem ID="rbmi_Item2" ViewStateMode="Disabled" Text="text 2" Value="value2"></telerik:RibbonBarMenuItem>
                                                        <telerik:RibbonBarMenuItem ID="rbmi_Item3" ViewStateMode="Disabled" Text="text 3" Value="value3"></telerik:RibbonBarMenuItem>
                                                    </Items>
                                                </telerik:RibbonBarMenu>
            </Items>
            </telerik:RibbonBarGroup>
            </telerik:RibbonBarTab>
        </telerik:RadRibbonBar>

.aspx.cs


public partial class WebForm2 : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RibbonBarMenu rbmHandle = (RibbonBarMenu)RadRibbonBar1.FindControl("rbmCaseCloneOptions");
            rbmHandle.FindMenuItemByValue("value1").Visible = false;
            rbmHandle.FindMenuItemByValue("value2").Visible = false;
            rbmHandle.FindMenuItemByValue("value3").Visible = true;
        }
 
        protected void RadRibbonBar1_MenuItemClick(object sender, Telerik.Web.UI.RibbonBarMenuItemClickEventArgs e)
        {
            string s = e.Item.Value;
        }
    }

and the string s, keeps getting value of value1 ... Am I missing something ?
Kate
Telerik team
 answered on 11 Dec 2013
3 answers
107 views

Hi Team,

Is it possible to group  stacked bar 100 in  radchart(in ASP.NET website)?(please find the attached image for the clear view of requirement).
If it is possible can you provide me a demo code(using c#)?
Please provide me quick response

Danail Vasilev
Telerik team
 answered on 11 Dec 2013
2 answers
76 views
Does anybody know of a simple instruction guide on how to use the RadFilter that I could give to my users?  I think the control is simple enough to use, but I keep having to answer questions and show them how it works.  Before I go through the trouble to write help instructions, I was hoping there is something already out there.

Thanks!

Matt
Matt
Top achievements
Rank 1
 answered on 11 Dec 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?