Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
180 views
Is there a way to use the ToolsFile in combination with a custom EditorToolGroup/DockingZone? The only documentation I could find was to manually add the tools I want (either in the markup or codebehind).

Thanks.

-AB
Tervel
Telerik team
 answered on 05 Jan 2009
7 answers
1.2K+ views
Hello,

In RadControls for ASP.NET AJAX Q1 2008 there is a change in the Client-Side API. The compatibility layer which was used in the transition beta period is now removed. All client-side methods strictly follow the ASP.NET AJAX conventions and are lower case. For instance: set_navigateUrl() should always be used from now on, set_NavigateUrl() is no longer supported. This also results in significant improvement in page loading times.

If you have used RadWindow for ASP.NET and now you upgrade to RadWindow for ASP.NET AJAX, the old naming convention in ASP.NET will still work, but we strongly recommend to change your code to match the new convention. More information about the changes and backward compatibility of the control is available in the documentation, section Controls / RadWindow / Overview / Changes and Backward Compatibility and Migration from RadWindow Classic to RadWindow Prometheus.

Best regards,
The Telerik team
Sunghwan
Top achievements
Rank 1
 answered on 05 Jan 2009
2 answers
145 views
Hi,

I have a fromview with two radtooltips. It works fine without RadAjaxPanel.
With RadAjaxPanel RadToolTips doesn't work once I click "save" or "cancel" button. I have to refresh the page to get tooltips works.
Thanks,
Here is the code:

<%

@ Control Language="C#" AutoEventWireup="true" CodeFile="test.ascx.cs" Inherits="test" %>

 

<%

@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

 

<

 

telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">

 

<

 

script type="text/javascript">

 

 

 

function clientShow(sender, eventArgs)

 

{

 

var textbox2 = (document.getElementById("<%=TextBox2.ClientID %>"));

 

textbox2.focus();

 

 

var textbox1 = (document.getElementById('<%=FormView1.FindControl("TextBox1").ClientID %>')).value;

 

(document.getElementById(

"<%=TextBox2.ClientID %>")).value = textbox1;

 

 

 

 

}

 

function clientShow1(sender, eventArgs)

 

{

 

var textbox20 = (document.getElementById("<%=TextBox4.ClientID %>"));

 

textbox20.focus();

 

 

var textbox10 = (document.getElementById('<%=FormView1.FindControl("TextBox3").ClientID %>')).value;

 

(document.getElementById(

"<%=TextBox4.ClientID %>")).value = textbox10;

 

 

 

 

}

 

 

function PopTB()

 

{

 

var textbox2 = (document.getElementById("<%=TextBox2.ClientID %>")).value;

 

(document.getElementById(

'<%=FormView1.FindControl("TextBox1").ClientID %>')).value = textbox2;

 

 

// var tooltip1 = $find("RadToolTip1");

 

var tooltip1 = $find("<%=RadToolTip1.ClientID%>");

 

 

tooltip1.hide();

 

 

 

}

 

function PopTB1()

 

{

 

var textbox3 = (document.getElementById("<%=TextBox4.ClientID %>")).value;

 

(document.getElementById(

'<%=FormView1.FindControl("TextBox3").ClientID %>')).value = textbox3;

 

 

var tooltip2 = $find("<%=RadToolTip2.ClientID%>");

 

tooltip2.hide();

}

 

 

</

 

script>

 

</

 

telerik:RadCodeBlock>

 

 

<asp:ScriptManager ID="ScriptManager1" runat="server" />

 

 

<div>

 

 

&nbsp;

 

 

&nbsp;&nbsp;&nbsp;&nbsp;

 

 

<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px"

 

 

Width="300px">

 

 

&nbsp;<asp:FormView ID="FormView1" runat="server" DefaultMode="Edit" DataSourceID="SqlDataSource1" OnPageIndexChanging="FormView1_PageIndexChanging">

 

 

<InsertItemTemplate>

 

 

<asp:TextBox ID="TextBox1" Text="This is my text" runat="server" Height="75px" TextMode="MultiLine" Width="372px" ></asp:TextBox>&nbsp;

 

 

<br />

 

 

<br />

 

 

<asp:TextBox ID="TextBox3" runat="server" Height="75px" Text="This is my second text"

 

 

TextMode="MultiLine" Width="372px"></asp:TextBox><br />

 

 

<asp:Button ID="Button3" runat="server" CommandName="Insert" Text="insert" />

 

 

<asp:Button ID="Button4" runat="server" CommandName="Cancel" Text="Cancel" /><br />

 

 

</InsertItemTemplate>

 

 

<EditItemTemplate>

 

 

<asp:TextBox ID="TextBox1" runat="server" Height="75px" Text='<%# Bind("CODE") %>'

 

 

TextMode="MultiLine" Width="372px"></asp:TextBox><br />

 

 

<asp:TextBox ID="TextBox3" runat="server"

 

 

Height="75px" Text='<%# Bind("MESSAGE") %>' TextMode="MultiLine" Width="372px"></asp:TextBox><asp:Button

 

 

ID="Button3" runat="server" CommandName="Update" Text="Save" /><asp:Button ID="Button4"

 

 

runat="server" CommandName="Cancel" Text="Cancel" />

 

 

</EditItemTemplate>

 

 

</asp:FormView> &nbsp;

 

 

</telerik:RadAjaxPanel>

 

 

<br />

 

 

<br />

 

 

<br />

 

 

<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ATR2_DELETEConnectionString %>"

 

 

DeleteCommand="DELETE FROM [ErrorCumulative] WHERE [Record_Id] = @Record_Id"

 

 

InsertCommand="INSERT INTO [ErrorCumulative] ([CODE], [MESSAGE]) VALUES (@CODE, @MESSAGE)"

 

 

SelectCommand="SELECT [Record_Id], [CODE], [MESSAGE] FROM [ErrorCumulative]"

 

 

UpdateCommand="UPDATE [ErrorCumulative] SET [CODE] = @CODE, [MESSAGE] = @MESSAGE WHERE [Record_Id] = @Record_Id">

 

 

<DeleteParameters>

 

 

<asp:Parameter Name="Record_Id" Type="Int32" />

 

 

</DeleteParameters>

 

 

<UpdateParameters>

 

 

<asp:Parameter Name="CODE" Type="String" />

 

 

<asp:Parameter Name="MESSAGE" Type="String" />

 

 

<asp:Parameter DefaultValue="1" Name="Record_Id" Type="Int32" />

 

 

</UpdateParameters>

 

 

<InsertParameters>

 

 

<asp:Parameter Name="CODE" Type="String" />

 

 

<asp:Parameter Name="MESSAGE" Type="String" />

 

 

</InsertParameters>

 

 

</asp:SqlDataSource>

 

 

&nbsp;&nbsp;

 

 

<telerik:RadToolTip ID="RadToolTip1" runat="server" Animation="Resize" Height="300px"

 

 

ManualClose="True" OnClientShow="clientShow" RelativeTo="Element" ShowEvent="OnClick"

 

 

Skin="Web20" TargetControlID="TextBox1" Width="557px">

 

 

<asp:TextBox ID="TextBox2" runat="server" Height="265px" TextMode="MultiLine" Width="550px"></asp:TextBox>

 

 

<asp:Button ID="Button1" runat="server" OnClientClick="PopTB(); return false;" Text="Insert" /></telerik:RadToolTip>

 

 

<br />

 

 

<br />

 

 

<telerik:RadToolTip ID="RadToolTip2" runat="server" Animation="Resize" Height="300px"

 

 

ManualClose="True" OnClientShow="clientShow1" RelativeTo="Element" ShowEvent="OnClick"

 

 

Skin="Web20" TargetControlID="TextBox3" Width="557px">

 

 

<asp:TextBox ID="TextBox4" runat="server" Height="265px" TextMode="MultiLine" Width="550px"></asp:TextBox>

 

 

<asp:Button ID="Button2" runat="server" OnClientClick="PopTB1(); return false;" Text="Insert" /></telerik:RadToolTip>

 

 

&nbsp;<br />

 

 

<br />

 

 

<br />

 

 

<br />

 

 

 

</div>

 

fatma
Top achievements
Rank 1
 answered on 05 Jan 2009
1 answer
57 views
 I have a problem with the InsertEmoticon

This is my code:

 

// Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "",

 

 

//"<script type=\"text/javascript\">function OnClientCommandExecute(editor, args){var name = args.get_name();var val = args.get_value();if (name == \"Emoticons\"){editor.pasteHtml(\"<img src='\" + val + \"'>\");args.set_cancel(true);}");

 

 

 

 

//Page.ClientScript.RegisterClientScriptBlock(Page.GetType(), "smile",

 

 

// " <script type=\"text/javascript\">" +

 

 

// " //<![CDATA[" +

 

 

// " Telerik.Web.UI.Editor.CommandList[\"InsertEmoticon\"] = function(commandName, editor, args)" +

 

 

// " {" +

 

 

// " var myCallbackFunction = function(sender, args)" +

 

 

// " {" +

 

 

// " editor.pasteHtml(String.format(\"<img src='{0}' border='0' align='middle' alt='emoticon' /> \", args.image));" +

 

 

// " }" +

 

 

// " editor.showDialog(\"InsertEmoticon\", {}, myCallbackFunction);" +

 

 

// " };" +

 

 

// " //]]>" +

 

 

// "</script>");

 

 

//main.Tools.Add(new EditorTool("InsertEmoticon"));

 

 

 

 

EditorDropDown x = new EditorDropDown("InsertEmoticon");

 

 

x.Items.Add(

new EditorDropDownItem("<IMG SRC='pages/emoticons/21.gif' />", "pages//emoticons/icon_wink.gif"));

 

main.Tools.Add(x);

 

DialogDefinition insertEmoticonDialogDefinition = new DialogDefinition("~/pages/InsertEmoticon.ascx", new DialogParameters());

 

insertEmoticonDialogDefinition.Modal =

true;

 

insertEmoticonDialogDefinition.VisibleTitlebar =

true;

 

insertEmoticonDialogDefinition.VisibleStatusbar =

true;

 

insertEmoticonDialogDefinition.Width =

Unit.Pixel(400);

 

insertEmoticonDialogDefinition.Height =

Unit.Pixel(245);

 

insertEmoticonDialogDefinition.VisibleStatusbar =

false;

 

insertEmoticonDialogDefinition.Title =

"Insert Smiley";

 

editor.AddDialogDefinition(

"InsertEmoticon", insertEmoticonDialogDefinition);

 

in this way i can see 1 image i now that there a better way in addition i don’t know how to catch the event of the click on the image
what i can do ?

 

Tervel
Telerik team
 answered on 05 Jan 2009
2 answers
137 views
Hi

In my application i use a user control where i add an AjaxRequest manualy to update a radGrid from a combobox and everything works fine but i'm not able to show the loading panel when the ajax request is add manualy. I know that i have to set the AjaxManager as an initiator but i have to use a RadAjaxManagerProxy, so i cannot add it as an initiator of the resquest. So how i can show the loading panel when i add the ajaxRequest manualy. There is the my simple code snippet.

     $find("<%= RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("arg");    
 

Thanks in advance for your help.
Dominic
Top achievements
Rank 2
 answered on 05 Jan 2009
1 answer
109 views
I would like to see a dedicated ribbon bar control for APS.NET AJAX.

If you would like that to, cast your "vote" in this thread :-)
Ivo
Telerik team
 answered on 05 Jan 2009
1 answer
163 views
Hi,  I have a GridCheckBoxColumn that im creating in codebehind with the DataField and Unique Name called active

I need to get its value in ItemDataBound so I can change the text of the Edit column based on this value. So this is what im doing

        if (e.Item is GridDataItem)
        {
            GridDataItem dataItem = e.Item as GridDataItem;
            if (dataItem["active"].Text == "False")
            {
                   // Change edit column text here
            }
            else
            {
                  // Change edit column text here
            }
        }

All my other columns in DataItem return the proper values but all the checkbox column returns is &nbsp;  The visible and display are set to true and the CheckBoxColumn is visible.   Is this the correct way to do this?   ive tried searching the docs and forums for GridCheckBoxColumn but it either returns no results or I get a server error.

Thoughts?
-Keith


SonicImaging
Top achievements
Rank 1
 answered on 05 Jan 2009
4 answers
195 views
I want to show a radWindow with a multiline textBox in it when a link on each row is clicked. A link should be just used for showing a radWindow on each click, rest is on radWindow. I want to get all the values of a whole row as well, so that i could do some of calculations with them.
Thank you
renvaldas
Top achievements
Rank 1
 answered on 05 Jan 2009
4 answers
174 views
Downloaded "RadControls_for_ASP.NET_AJAX_Manual_2008.1.515.zip" and whilst the left hand panel  of the CHM files ( for example: "telerik.aspnetajax.radupload.2008.Q1.chm") produces the Contents index in the left hand panel OK, nothing comes up in the right hand panel other than "Internet Explorer was unable to link to the Web page you requested. The page might be temporarily unavailable." messages. Bit frustrating this as I'm having great problems with the Upload in a DNN paradigm actually performing an upload, (although it works fine in a VS2005 non-DNN environment).

1. Anybody got any answers to the Help File issue?

2. In fact has anybody managed to install the source for Upload Control to work within a DNN Module. I must be leaving something out somewhere as nothing happens when the Upload Submit button is pressed. Filecount is always 0. Strange when it seems to work OK with a normal VS2005 project.

Daniel
Telerik team
 answered on 05 Jan 2009
3 answers
134 views
I have a grid with a templated edit form. I have a custom validator that adds up the values from 4 rad numeric text boxes and makes sure they are equal to a 5th numeric text box.

When the grid was not using AJAX, I had to place the client-side javascript outside of the grid, and used the OnLoad event of the custom validator (which is inside of the edit form) to populate a literal control with javascript that has the correct ClientIDs for all of the controls.

We then decided to AJAXify the grid, and everything broke. I tried placing the literal control inside of an update panel, and even though it loads at the same time as the grid -- the javascript will not load into IE. When a user clicks submit -- I get a javascript error saying the function can not be found and the user can not complete the form.

I've tried moving the javascript into the edit form, but it does not work either.

How does one get the clientid's for the controls inside of the edit form without the grid being in edit mode or hooking them up from an event? (Or any other solution that makes this darn thing work)

Here's the javascript (I know its crude):
    protected void JS_Load(object source, EventArgs e)  
    {  
       Control container = ((Control)source).Parent;  
       string javascript = "<script language=\"javascript\" > " +  
        "\nfunction checkValues(source, clientside_arguments)" +  
        "\n { " +  
        "\n         var returnval = false;" +  
        "\n var box1 = " + container.FindControl("dispRadNumericTextBox1").ClientID + ";" +  
        "\n var box2 = " + container.FindControl("dispRadNumericTextBox2").ClientID + ";" +  
        "\n var box3 = " + container.FindControl("dispRadNumericTextBox3").ClientID + ";" +  
        "\n var box4 = " + container.FindControl("dispRadNumericTextBox4").ClientID + ";" +  
        "\n var cert = " + container.FindControl("certAmt").ClientID + ";" +  
        "\n var total = 0;      " +  
        "\n if (IsNumeric(box1) && " + container.FindControl("dispDatePicker1").ClientID + ".DateInput.InitialValue != '' )" +  
        "\n                         total += box1.InitialValue;" +  
        "\n if (IsNumeric(box2) && " + container.FindControl("dispDatePicker2").ClientID + ".DateInput.InitialValue != '' )" +  
        "\n                         total += box2.InitialValue;    " +  
        "\n if (IsNumeric(box3) && " + container.FindControl("dispDatePicker3").ClientID + ".DateInput.InitialValue != '' )" +  
        "\n                         total += box3.InitialValue;" +  
        "\n if (IsNumeric(box4) && " + container.FindControl("dispDatePicker4").ClientID + ".DateInput.InitialValue != '' )" +  
        "\n                         total += box4.InitialValue;           " +  
        "\n if (total == 0)" +  
        "\n   returnval = true;" +  
        "\n else" +  
        "\n {" +  
        "\n   if (total == cert.InitialValue)" +  
        "\n       returnval = true;" +  
        "\n }" +  
        "\n clientside_arguments.IsValid = returnval;" +  
        "\n }" +  
        "\n function IsNumeric(strString)" +  
        "\n {" +  
        "\n     var strValidChars = \"0123456789.-\";" +  
        "\n     var strChar;" +  
        "\n     var blnResult = true;" +  
        "\n     if (strString.length == 0) return false;" +  
        "\n for (i = 0; i < strString.length && blnResult == true; i++) {" +  
        "\n         strChar = strString.charAt(i);" +  
        "\n         if (strValidChars.indexOf(strChar) == -1) {" +  
        "\n             blnResult = false;" +  
        "\n         }" +  
        "\n     }" +  
        "\n     return blnResult;" +  
        "\n }" +  
        "\n </script>";  
       this.javascriptLiteral.Text = javascript;  
    } 

Here's the custom validator:
<asp:CustomValidator ID="CustomValidator1" CssClass="errorMessage" runat="server" 
                    ErrorMessage="Disbursement amounts do not equal Cert Amount" 
                    ValidationGroup="cert" OnLoad="JS_Load" 
                    Display="Dynamic" ClientValidationFunction="checkValues">nbsp;</asp:CustomValidator> 

Here's the literal:
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server">  
<asp:Literal ID="javascriptLiteral" runat="server"></asp:Literal> 
</telerik:RadAjaxPanel> 

And finally the AJAX manager config:
<telerik:RadAjaxManagerProxy ID="RadAjaxManagerProxy1" runat="server">  
    <AjaxSettings> 
        <telerik:AjaxSetting AjaxControlID="RadGrid1">  
            <UpdatedControls> 
                <telerik:AjaxUpdatedControl ControlID="RadGrid1" LoadingPanelID="RadAjaxLoadingPanel1" /> 
                <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1" /> 
            </UpdatedControls> 
        </telerik:AjaxSetting> 
    </AjaxSettings> 
</telerik:RadAjaxManagerProxy> 

Iana Tsolova
Telerik team
 answered on 05 Jan 2009
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?