Telerik Forums
UI for ASP.NET AJAX Forum
2 answers
126 views
Hi,

I have a rad time picker in my application.

I am setting start and end time using the radtimepicker.timeview.starttime and endtime .

And as mentioned above i can able to set the interval as well.

On button click i have to get the all items from the radtimepicker and have to insert into database.

Can any one suggest me how to get the time collection from the radtimepicker timeview.

Thanks
Thenmozhi
Thenmozhi
Top achievements
Rank 1
 answered on 12 Jan 2011
1 answer
169 views
Hi,

I want to inject some JavaScript code into the aspx page (on some server side event). But the script doesn't get rendered on the page.
I have RadScriptManager on the MasterPage, and RadScriptBlock on the ContentPage.

Then I wrote below code , but it didn't worked:
StringBuilder sb = new StringBuilder();
sb.Append("<script>alert('script test')</script>");
LiteralControl script = new LiteralControl(sb.ToString());
RadScriptBlockCP.Controls.Add(script);

I also tried below code but failed:
String scriptContent = "script type=\"text/javascript\" language=\"javascript\">alert('test alert')</script>";
(RadScriptBlockCP.Controls[0] as LiteralControl).Text = scriptContent;

Please help.
Simon
Telerik team
 answered on 12 Jan 2011
1 answer
70 views
Hi All:
I have an RadUpload control inside sharepoint 2010 webpart , when i click upload button the RadUpload required a valid user name and password .

How do to enable anonymous  access for RadUpload??
Genady Sergeev
Telerik team
 answered on 12 Jan 2011
3 answers
63 views
Hello,

I've encountered an odd problem attempting to use the "PostBackUrl" property of the button used to send the postback which causes the uploader to save the file.

Everything works as planned as long as the button is initially enabled.  However, if the button starts out disabled then the cross page postback doesn't occur. 

This is hard for me to explain clearly so I'm including some code I was testing with.   There are two buttons on this page.  The only difference between the buttons, besides their ID, is that one button is initially disabled and the other one is enabled.  The file is uploaded when either button is clicked.  But only the button which is initally enabled sends a response to the second page.  

I did notice there was a query in the URL after testing with the disabled button:  test.aspx?RadUrid=4ec5a3c0-0503-422b-83d0-743982ca7ffa

I also tried, without luck,  the suggestion in this post ASyncUpload Issue? forum post since it was possible the problem was caused by the same factors.

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="test.aspx.vb" Inherits="test" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  
<head runat="server">
    <title></title>
   
</head>
<body>  
  
    <form id="form1" runat="server">
        
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
    </telerik:RadScriptManager>
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
    <script type="text/javascript">
        //<![CDATA[
  
        function fileUploaded(sender, eventArgs) {
            var btn = $get("<%= Me.BTN_loadfile.ClientID%>");
            if (typeof (btn) != "defined") {
                btn.disabled = false;
            }
        }
  
        //]]>
    </script>
    </telerik:RadCodeBlock>
  
    <telerik:RadProgressManager ID="RPM_importAdmin" runat="server" />
        <br />
        File to load administrators from (.CSV,.XLS, or .XLSX):
        <br />
        <br />
        <telerik:RadAsyncUpload ID="RAU_uploadFile" MaxFileInputsCount="1" MaxFileSize="10485760" InputSize="60" AllowedFileExtensions="csv,xls,xlsx" runat="server" OverwriteExistingFiles="true" OnClientFileUploaded="fileUploaded" >
            <Localization Select="Browse" />
        </telerik:RadAsyncUpload>
        <br />
        <br />
        <telerik:RadProgressArea ID="RPA_uploadFile" DisplayCancelButton="true" runat="server">
        </telerik:RadProgressArea>
        <asp:Button ID="BTN_loadfile" runat="server" Text="Should Go" Enabled="false" CausesValidation="false" PostBackUrl="~/test2.aspx"></asp:Button>
        <asp:Button ID="Button1" runat="server" Text="Goes" CausesValidation="false" PostBackUrl="~/test2.aspx"></asp:Button>
    <br />
    </form>
</body>
</html>


The code-behind for the SECOND page is the following.   The code-behind for the first page just sets values for the TemporaryFolder and TargetFolder properties.

Imports System.IO
Imports Telerik.Web.UI
  
Partial Class test2
    Inherits System.Web.UI.Page
  
    Protected fileUploader As RadAsyncUpload = Nothing
  
    Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.PreInit
        If PreviousPage Is Nothing Then
            If Not IsPostBack Then
                Me.Label1.Text = "no previous page"
            End If
        Else
            Me.fileUploader = CType(PreviousPage.Form.FindControl("RAU_uploadFile"), RadAsyncUpload)
            If Me.fileUploader IsNot Nothing AndAlso Me.fileUploader.UploadedFiles.Count > 0 Then
                Me.Label1.Text = "File: " & Path.Combine(Me.fileUploader.TargetFolder, Me.fileUploader.UploadedFiles(0).FileName)
            End If
        End If
    End Sub
  
End Class

The version of the Telerik .dll is: 2010.3.1215.35

Any help or ideas would be greatly appreciated.

Thanks,
Genady Sergeev
Telerik team
 answered on 12 Jan 2011
6 answers
172 views
Hi,

I had a form for eg. let say userprofile, In that i have to create new users. So the user name should be unique. I had placed required field validator for  validating mandatory fields (ie. Fields should not be empty while insert). I have checked with sql query for user name duplication. Now i want display a message if the user name already exist. I need your help in this regards.

Thanks & Regards
Kannan
Naunton
Top achievements
Rank 1
 answered on 12 Jan 2011
1 answer
74 views
Hi

Can we place image right side to the Text in a RadTab? is it possible?
Shinu
Top achievements
Rank 2
 answered on 12 Jan 2011
3 answers
114 views
I found a KB article on how to print the content of a RadToolTip (http://www.telerik.com/support/kb/aspnet-ajax/tooltip/print-radtooltip-content.aspx), but I can't get this sort of functionality to work with the RadToolTipManager.

I'm using the manager because I have a GridView that I've got a "details" column in - this shows a tooltip with a user control, i want to be able to print just the contents of the user control.  Please provide assistance in doing so.
Svetlina Anati
Telerik team
 answered on 12 Jan 2011
1 answer
96 views
I've got a simple user control which contains a Rad Combo Box, and the Combo has a Rad Tooltip attached.

The UC is then placed inside another tooltip within another form and opened when a button is pressed.  However when I click into the combo in the UC with the tooltip the tooltip with the UC closes...

Any advice anyone...!???

Cheers
Cliff
Svetlina Anati
Telerik team
 answered on 12 Jan 2011
1 answer
121 views
We have been using version 2010.3.1109.35 since 2010-11-11 without problems, upgraded to version 2010.3.1215.35 on 2010-12-25. The RadAsyncUpload is now failing to deserialize our custom AsyncUploadConfiguration properties.
Sample code below.
ASPX page with the RadAsyncUpload control:
<telerik:RadAsyncUpload runat="server" ID="FilesToUpload" MultipleFileSelection="Automatic"
    HttpHandlerUrl="~/Tracking/FileUpload.ashx" AutoAddFileInputs="true" />

Custom Configuration:
public class CustomConfiguration : AsyncUploadConfiguration
{
    public string UserName { get; set; }
    public long FileNoteID { get; set; }
    public bool SaveContentOnly { get; set; }
}

Initializing configuration in code behind of ASPX page with RadAsyncUpload control
public partial class UploadFiles
{
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
CustomConfiguration config = FilesToUpload.CreateDefaultUploadConfiguration<CustomConfiguration>();
            config.FileNoteID = 1234; // sample ID
            config.UserName = "michael"; // sample user name
            config.SaveContentOnly = true;
            FilesToUpload.UploadConfiguration = config;
    }
}

Code behind of Http handler, our additional properties (UserName, FileNoteID) are not being deserialized here anymore.
public class FileUpload : AsyncUploadHandler
{
    protected override IAsyncUploadResult Process(UploadedFile file, HttpContext context, IAsyncUploadConfiguration configuration, string tempFileName)
    {
        CustomConfiguration config = configuration as CustomConfiguration;
        if (config != null)
        {
            // UserName & FileNoteID come through as "" and 0 with latest release.
            DoSomething(config.UserName, Config.FileNoteID);
        }
    }
}

Can someone please let me know how to resolve this issue? Do we need to change something in our web.config?

Thanks
Genady Sergeev
Telerik team
 answered on 12 Jan 2011
1 answer
383 views
I need to trigger ajaxRequest using JavaScript. JavaScript will pass additional information/parameter (string) that will be used by ajaxRequest to load/get additional information. Can you provide an example?
Prangadj
Top achievements
Rank 1
 answered on 12 Jan 2011
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Sergii
Top achievements
Rank 1
Iron
Iron
Dedalus
Top achievements
Rank 1
Iron
Iron
Lan
Top achievements
Rank 1
Iron
Doug
Top achievements
Rank 1
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?