Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
268 views
Hello guys

I'm trying to create or activate or clone a raddatepicker dynamically using javascript and webservices
Now I tried 2 scenarios
-Render the control using webservices like this, the control appears ok, but nothing work on it (no validation, dropdown button...) and the rendered string is pretty massive, is there a function that I could use to bind/initialize the control to static scripts?

<WebMethod()> _
    Public Function HelloWorld(ByVal s As String) As String
         Dim np As Page = New Page
        np.Controls.Add(New Telerik.Web.UI.RadScriptManager)
        Dim d As Telerik.Web.UI.RadDatePicker = New Telerik.Web.UI.RadDatePicker
        d.ID = "ddd"
        d.EnableViewState = False
        d.DbSelectedDate = Now
        d.RegisterWithScriptManager = False
        d.Page = np
 
        Dim tw As System.IO.StringWriter = New System.IO.StringWriter()
        Dim hw As HtmlTextWriter = New HtmlTextWriter(tw)
        d.RenderControl(hw)
        Return tw.ToString()
    End Function


<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb" Inherits="WebApplication2.WebForm1" %>
<%@ 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">
<head runat="server">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.5.min.js"></script>
<!--http://code.jquery.com/jquery-1.5.js-->
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
     <telerik:RadScriptManager ID="RadScriptManager1" runat="server"></telerik:RadScriptManager>
    <script language="javascript" type="text/javascript">
        function BC(s, e) {
            $.ajax({ url: "/Webservice1.asmx/HelloWorld?s=" + s.get_id(), success: function (result) {
                 //var nd = $("#RadDatePicker1")[0].cloneNode();
                //nd.id = "asd";
                $("#c")[0].innerHTML = result.text;
                //$("#c")[0].insertBefore($("#RadDatePicker1")[0]);
                //nd.style.visibility = "visible";
            }
            });
        }
                </script>
 
        <div id="c"></div>
    <div>
<!--        <telerik:RadDatePicker ID="RadDatePicker1" Runat="server"></telerik:RadDatePicker>-->
         
<telerik:RadButton ID="RadButton1" runat="server" onclientclicked="BC"
            AutoPostBack="False">
</telerik:RadButton>
    </div>
    </form>
</body>
</html>


-Then I tryed the cloneNode function, but I can't even make the raddatepicker appear
var nd = $("#RadDatePicker1")[0].cloneNode(true);
                
nd.id = "asd";
               $("#c")[0].insertBefore(nd);
                //$("#c")[0].innerHTML = result.text;
Idealy, I guess I want to statically generate all the necessary scripts and one instance of each control that I need 
and then clone them dynamically with javascript as needed.

Is there a way to this? Is there a javascript telerik.ui.raddatepicker constructor?
You guys must have a way since there is a client side radgrid insert row

Thank you very much

Louis
Veli
Telerik team
 answered on 21 Feb 2011
1 answer
137 views
I am wanting to validate based on a complex set of rules the entry into a textbox.  My preference would be to keep that validation on the server side in the code behind as the logic is written there already so I do not want to maintain it in javascript too for client side validation.  How can I call a validation method either on text change or focus via ajax with this control?
Shinu
Top achievements
Rank 2
 answered on 21 Feb 2011
1 answer
84 views
i am facing lot of problem,i am returning number of days by combobox and i have to add into existing days,i did almost all conversion its return object type not supported by javascript,and in alert box while debugging its reurning objec,object.


please help me out as i need this thing very soon
Veli
Telerik team
 answered on 21 Feb 2011
1 answer
392 views
Hi Telerik Team

I would like to create my custom button with our own designed image. I copied the specific style into my own custom skin project and change the buttonsprite.gif with my own design, but my image is heigher than default one, so I have to overwrite the default common style. according to telerik suggest, it's not recommend to "important" keyword. So can someone tell me how can I overwrite the following style in my custom skin css file? I try to put my custom name in front of them, e.g. .RadButton_LongWithImage .rbSkinnedButton, but it doesn't work.

.rbSkinnedButton
{
    display: inline-block;
    position: relative;
    background-color: transparent;
    background-repeat: no-repeat;
    border: 0 none;
    height: 22px;
    text-align: center;
    text-decoration: none;
    white-space: nowrap;
    background-position: right 0;
    padding-right: 4px; /* this value is hacked for webkit */
}
 
 
.rbDecorated
{
    display: block;
    height: 22px;
    padding: 0 6px 0 10px;
    border: 0;
    text-align: center;
    background-position: left -22px;
    overflow: visible;
    background-color: transparent;
    outline: none;
    cursor: pointer;
    -wbkite-border-radius: 0; /* set default border-radius to 0 in mobile safari */
}
Bozhidar
Telerik team
 answered on 21 Feb 2011
3 answers
193 views
Some times Rad Data Pager displays like in the attached file

please tell me the solution for that

its very urgent.

Thanks
Kesava.

Princy
Top achievements
Rank 2
 answered on 21 Feb 2011
13 answers
348 views
Hi ,
I am using a RadGrid and i have a RadCombo in one of the column.  That combo has  external call back.

When the radcombo box triggers the selected index changed event of server side.  There in the code behind based on condition
I want to change the focus to either the same combo or next control in the grid. How ever as the page refreshes the i am loosing the focus.  I want IsPostback to be "True" because i have some condition to check in serverside.  And the focus should move to the next control in the grid.

Please tell me how i can achieve this?
Code in server side:
if condition()
{
((RadComboBox)currentEditItem["AmendmentNumber"].FindControl("ddlAmendmentNos")).Focus()
}
else
{

currentEditItem["AmendmentPurpose"].Focus();
((RadTextBox)currentEditItem["AmendmentPurpose"].FindControl("txtPurpose")).Focus();
}

RadCombo Settings:
<rad:GridTemplateColumn UniqueName="AmendmentNumber" DataField="Number" HeaderText="Bylaw #" ItemStyle-Width="10%"><ItemTemplate> <rad:RadComboBox Height="200px" ID="ddlAmendmentNos" MaxLength="10" runat="server" ToolTip="Enter Bylaw Number"AllowCustomText="true" MarkFirstMatch="false" ShowToggleImage="False" SkinsPath="~/RadControls/ComboBox/Skins"Skin="LIComboBoxSkin" ShowMoreResultsBox="true" EnableLoadOnDemand="True" ExternalCallBackPage="AmendmentNosDropDownBox.aspx"OnClientFocus="OnClientFocus" Text='<%# Eval("Number")%>' DataTextField="Number" OnSelectedIndexChanged="ddlAmendmentNos_SelectedIndexChanged"DataValueField="ID" AutoPostBack="true" ShowDropDownOnTextboxClick="false"></rad:RadComboBox></ItemTemplate></rad:GridTemplateColumn>

Regards
Siva Kumar KB
Mira
Telerik team
 answered on 21 Feb 2011
1 answer
52 views
 

 

Yana
Telerik team
 answered on 21 Feb 2011
1 answer
74 views
Hi,

I have set my editor, NewLineBr = "false". 
the HTML is showing correctly but preview for <p> tag doesn't show extra newline.

I have attached a video for your review
http://www.screencast.com/users/charlesXie/folders/Default/media/8203d19c-174c-4f4e-92cb-b63790c732d6

thanks
Charles
Stanimir
Telerik team
 answered on 21 Feb 2011
2 answers
89 views
HI

im using Radmenu.loadxml() to bind my Menu
1)
my menu is having 2 levels with two differnt css function for each level,i..e(.level1{},.level2{})
i want to change the main menu element background-colour when the submenu is hoverd or clicked

2)
display second element of main menu in 2 lines

How to achive these two?Please help.

Thanks
Harin
Kate
Telerik team
 answered on 21 Feb 2011
2 answers
123 views
Hi All,

I have RadChart, which i deployed on SharePoint site.
On mouse over on series, tooltip shows some information.


My issue is that, whenever i hover on SharePoint default search button or Search Textbox, tool-tip gets popup.
As per my understanding, the limit of tool-tip should be inside Chart area not outside.
How can i rid of this tooltip.
Any help will be greatly appriciated.

naimish
Top achievements
Rank 1
 answered on 21 Feb 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Bohdan
Top achievements
Rank 3
Iron
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Elliot
Top achievements
Rank 1
Iron
Iron
Iron
Sunil
Top achievements
Rank 1
Cynthia
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?