Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
341 views
Hello,
I have upgraded the telerik version from 2011-02 to 2012_03.

In my code behind, I set the ClientEvents.OnKeyPress value. Until the upgrade, it worked very well. But since it doesn't. it seems that the get_value() needs a delay to return the value. If I replace the get_value by document.getElementById, it works...

I would rather like to use the get_value() function.
Thanks for help...
Bernard

saisie.ClientEvents.OnKeyPress = @"enterSaisie2";
function pageLoad() 
        {
           textSaisie = $find("<%=saisie.ClientID %>");
        } 
function enterSaisie2(e)
        {
           if (window.event.type == "keypress" && window.event.keyCode == 13) 
           {
                try
                {
                    aSaisie = new String(textSaisie.get_value());
                                   // etc...
Bernard
Top achievements
Rank 1
 answered on 26 Feb 2013
1 answer
160 views
I get the following error when trying to RenderControl to html

Script control 'ExecutiveSummaryReport_RadGrid1' is not a registered script control. Script controls must be registered using RegisterScriptControl() before calling RegisterScriptDescriptors().
Parameter name: scriptControl

protected void ExecutiveSummary_EmailReport(object sender, EventArgs e)
{
    StringBuilder sb = new StringBuilder();
    StringWriter sw = new StringWriter(sb);
    HtmlTextWriter htw = new HtmlTextWriter(sw);
    ExecutiveSummaryReport_RadGrid1.RenderControl(htw);//Error happens here
}

What am I doing wrong?

Thanks!
Princy
Top achievements
Rank 2
 answered on 26 Feb 2013
3 answers
366 views
Hello everyone!!!

I am trying to show products data to a RadGrid, I have to create CRUD funtionalities, but the buttom to create a new product is outside the grid, and the link/buttoms to the edit and delete are in each row of the product entity. i am ussing Entityframework. 
Please if anyone can help me or giving me any ideao how I have to do it, the delete need to show a confirmation dialog.
Thanks and I hope you can give me some ideas.
Greetings!!!
Shinu
Top achievements
Rank 2
 answered on 26 Feb 2013
1 answer
139 views
Hello,

Does anyone know how to change the RadTreeViews' default collapse/expand image icon with a custom one?

Thanks,
JC.
Princy
Top achievements
Rank 2
 answered on 26 Feb 2013
5 answers
234 views
<telerik:GridButtonColumn CommandName="Confirm1" ConfirmDialogType="RadWindow" ConfirmText="are you sure?"   ConfirmTitle="Notice" FilterControlAltText="Filter Confirm column" Text="confirm"  UniqueName="Confirm1">  </telerik:GridButtonColumn>
hello
i have this gridbutton 
my problem is when i disable this button in "ItemCreated" from codebehind, its confirm message still be shown!!!
how i can disable its confirm message too?!

tanx
saman
saman
Top achievements
Rank 1
 answered on 26 Feb 2013
1 answer
225 views
Hi,

There is a RadTabStrip control in my user home page and I want to add a new tab to it using Javascript. I am able to add a new tab but the issue is that the change is not persisting after some postback is made. Am I missing something to save the change? Please help.

Thanks,
JC.
Princy
Top achievements
Rank 2
 answered on 26 Feb 2013
1 answer
86 views
Hi,

I am using radcalendar for displaying the dates. I want to add a RadButton and On clicking the button, I want to navigate to today's date in the calendar. I want this to be done using client side code.

Please help,Thanks,
Merlin.
Princy
Top achievements
Rank 2
 answered on 26 Feb 2013
1 answer
420 views
Hi,

I am new to Telerik Controls. Can anybody help me to point out how the RadCombobox differ from RadDropDownlist or both are more or less the same thing?. I am a bit confused regarding the usage of both.

Thanks.
Princy
Top achievements
Rank 2
 answered on 26 Feb 2013
4 answers
288 views
So, a bit complicated and I'm guessing there's an issue with my JavaScript so any help would be appreciated.

Here's my code:

Master Page
function pageLoad() {
    if (!Telerik.Web.UI.RadAsyncUpload.Modules.FileApi.isAvailable()) {
        $(".dropzone h5").hide();
        $(".dropzone p").hide();
        $(".dropzone").removeClass("dropzone");
    }
    else {
        $(document).bind({ "drop": function (e) { e.preventDefault(); } });
        $(".dropzone").each(function (index) {
            $(this).bind({ "dragenter": function (e) { dragEnterHandler(e, $(this)); } })
                .bind({ "dragleave": function (e) { dragLeaveHandler(e, $(this)); } })
                .bind({ "drop": function (e) { dropHandler(e, $(this)); } });
        });
    }
}

ASPX
<%@ Register Src="~/admin/widgets/assetmanager.ascx" TagPrefix="uc" TagName="AssetManager" %>
 
<uc:AssetManager runat="server" ID="Slides" />
<uc:AssetManager runat="server" ID="Boxes" />

ASCX
<telerik:RadScriptBlock runat="server" ID="RadScriptBlock1">
    <script type="text/javascript">
            //.Master file needs: function pageLoad() { loadAsync() }
            //Utils.js - loadAsync(), dropHandler(), dragEnterHandler(), dragLeaveHandler()
             
            function fileUploaded<%= AsyncUpload1.ClientID %>(sender, args) {
                alert("fileUploaded<%= AsyncUpload1.ClientID %>");
                $(".invalid.msg" + <%= AsyncUpload1.ClientID %>).hide();
                $find("<%=RadAjaxManager.GetCurrent(Page).ClientID %>").ajaxRequest("RebindAssets<%= AsyncUpload1.ClientID %>");
                $telerik.$(".invalid.msg" + <%= AsyncUpload1.ClientID %>).html("");
                sender.deleteFileInputAt(0);
            }
 
            function validationFailed<%= AsyncUpload1.ClientID %>(sender, args) {
                alert("validationFailed<%= AsyncUpload1.ClientID %>");
                $(".invalid.msg" + <%= AsyncUpload1.ClientID %>).show();
                $(".invalid.msg" + <%= AsyncUpload1.ClientID %>).html("Sorry, you are trying to upload an invalid type of file.");
                if ($(".filetypes").text() != "") {
                    var types = $(".filetypes").text().replace("(", "").replace(")", "");
                    $(".invalid.msg" + <%= AsyncUpload1.ClientID %>).append(" You can upload the following types of file: " + types + ".");
                }
                sender.deleteFileInputAt(0);
            }
    </script>
    <script type="text/javascript">
        //Telerik.Web.UI.RadAsyncUpload.Modules.Flash.isAvailable = function () { return false; };
        Telerik.Web.UI.RadAsyncUpload.Modules.Silverlight.isAvailable = function () { return false; };
    </script>
</telerik:RadScriptBlock>
 
<telerik:RadCodeBlock runat="server" ID="RadCodeBlock1">
    <span class="msg error invalid msg<%= AsyncUpload1.ClientID %>" style="display:none;"></span>
</telerik:RadCodeBlock>
<div id="pnlDropZone" runat="server" class="dropzone dr{0}">
    <h5>To upload, drop files here</h5>
    <p>or</p>
    <telerik:RadAsyncUpload runat="server" ID="AsyncUpload1" MultipleFileSelection="Automatic" MaxFileSize="52428800" Localization-Select="Select Files" DropZones=".dropzone" /> 
</div>

ASCX.VB
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
 Dim manager As RadAjaxManager = RadAjaxManager.GetCurrent(Page)
 AddHandler manager.AjaxRequest, AddressOf assets_AjaxRequest
 manager.AjaxSettings.AddAjaxSetting(manager, AsyncUpload1)
 manager.AjaxSettings.AddAjaxSetting(manager, ddlMoveTo)
 
 If Not IsPostBack Then
  AsyncUpload1.TargetFolder = "~/Images"
  AsyncUpload1.OnClientFileUploaded = "fileUploaded" & AsyncUpload1.ClientID
  AsyncUpload1.OnClientValidationFailed = "validationFailed" & AsyncUpload1.ClientID
 
  pnlDropZone.Attributes("class") = pnlDropZone.Attributes("class").Replace("{0}", AsyncUpload1.ClientID)
 End If
End Sub
 
Protected Sub AsyncUpload1_FileUploaded(sender As Object, e As Telerik.Web.UI.FileUploadedEventArgs) Handles AsyncUpload1.FileUploaded
 e.File.SaveAs(HttpContext.Current.Server.MapPath("~/images/" & e.File.FileName))
 'Add to database
End Sub

CSS
.dropzone
{
    text-align:center;
    padding:15px;
    border:dashed 5px #c0c0c0;
}
.dropzone h5
{
    margin:0;
}
.dropzone .RadUpload
{
    margin:5px auto 0;
    text-align:center;
}
.dropzone .RadUpload li
{
    list-style:none;
}
.dropzone .RadUpload input.ruFakeInput
{
    display: none;
}

My problem is that when I drag a file to the DropZone for either of the controls, both 'fileUploaded' functions are called and the file is uploaded twice.  If I drag to the actual AsyncControl itself, everything works fine and the file is only uploaded once.

Help!?

Tony.
Matt
Top achievements
Rank 2
 answered on 25 Feb 2013
2 answers
451 views
How do you control the direction of the dropdown for the RadComboBox. Presently I have several comboboxes on a form, each one opens in a different direction, some open scrolling up, others open scrolling down.  I want them all to display down.
Mark Kucera
Top achievements
Rank 1
 answered on 25 Feb 2013
Narrow your results
Selected tags
Tags
+? more
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Dean
Top achievements
Rank 1
Leland
Top achievements
Rank 2
Iron
Iron
Iron
Emil
Top achievements
Rank 1
Iron
Robert
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?