Telerik Forums
UI for ASP.NET AJAX Forum
1 answer
103 views
Hi Everyone,
 
I have an RadWindow control in an aspx page.
I have populated the Content of the RadWindow control with an Editable PDF ( Online Editable PDF users can fill the form).
I have an ASP.NET Button control outside the RadWindow.
In the click event of the ASP.NET Button, I need the PDF's values ( newly entered values). 
Is there anyway to get the PDF's values in the form of a byte array......?

Thanks in advance.
Rumen
Telerik team
 answered on 30 Nov 2012
2 answers
248 views
Hi! I am new with using the radlistview control. I am trying to mimic a very basic photo gallery to play with this listview control. I just want to display 9 images at a time, in columns of 3 (3x3). While I can get the images and titles to display. I can only get 1 column that shows all 9 images. Is there anything special I need to set to get my 3 "columns." There might be a pretty simple answer for this but I haven't found it yet. Thanks!
NEX
Top achievements
Rank 1
 answered on 30 Nov 2012
6 answers
166 views
Hello!

I found out that OnClientEntryAdded handler runs twice when AllowCustomEntry="true", which is somewhat undesirable behavior. There's a simple reproduction below. One should put a breakpoint in ClientEntryAdded() and in ServerEntryAdded(). The consequence of steps is
1) ClientEntryAdded()
2) ServerEntryAdded()
3) ClientEntryAdded()


Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="TestFocusOnAutocomplete._Default" %>
<%@ Register Assembly="Telerik.Web.UI, Version=2012.3.1120.35, Culture=neutral, PublicKeyToken=121fae78165ba3d4" 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">
    <title></title>
    <script type="text/javascript">
        function ClientEntryAdded(sender, eventArgs) {           
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <asp:ScriptManager runat="server" />
        <telerik:RadAutoCompleteBox runat="server"
                                    AllowCustomEntry="true"
                                    OnClientEntryAdded="ClientEntryAdded"
                                    OnEntryAdded="ServerEntryAdded"
                                    ID="racb" />
    </div>
    </form>
</body>
</html>

Default.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Telerik.Web.UI;
using System.Threading;
 
namespace TestAutocomplete
{
    public partial class _Default : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            racb.DataSource = new List<string>();
            racb.DataBind();
        }
 
        protected void ServerEntryAdded(object sender, AutoCompleteEntryEventArgs e)
        {
        }
    }
}







Nencho
Telerik team
 answered on 30 Nov 2012
4 answers
92 views
I have an error message.

Telerik.Web.UI.ReminderDialog with ID='ReminderDialog' was unable to find embedded skin with name 'DefaultCustom'. Please, make sure that you spelled the skin name correctly, or if you want to use a custom skin, set EnableEmbeddedSkins=false.

I used DefaultCustom skin. But I can't find Reminder Dialog skin property.
So, Where can I setup Reminder Dialog skin?

Here is my aspx code.
<link href="TelerikSkins/Scheduler.DefaultCustom.css" type="text/css" rel="Stylesheet" />
<link href="TelerikSkins/SchedulerRecurrenceEditor.DefaultCustom.css" type="text/css" rel="Stylesheet" />
<link href="TelerikSkins/SchedulerReminderDialog.DefaultCustom.css" type="text/css" rel="Stylesheet" />
<link href="TelerikSkins/Calendar.DefaultCustom.css" type="text/css" rel="Stylesheet" />
<link href="TelerikSkins/Menu.DefaultCustom.css" type="text/css" rel="Stylesheet" />
 
<telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="DefaultCustom" />
 
<telerik:RadScheduler ID="RadSchedulerTemplate" runat="server" EnableEmbeddedSkins="false"
    EnableDescriptionField="true" Height="800"
    SelectedView="DayView" DataKeyField="ID" DataSubjectField="Subject" DataStartField="Start" 
        DataEndField="End"
    DataDescriptionField="Description" DataRecurrenceField="RecurrenceRule"     
        DataRecurrenceParentKeyField="RecurrenceParentID"
    DataReminderField="Reminder" Reminders-Enabled="true" >
    <AdvancedForm Modal="true" />
    <AppointmentContextMenuSettings EnableDefault="true" EnableEmbeddedSkins="false" />
    <TimeSlotContextMenuSettings EnableDefault="true" EnableEmbeddedSkins="false" />
    <Reminders Enabled="true" />
</telerik:RadScheduler>
Plamen
Telerik team
 answered on 30 Nov 2012
1 answer
122 views
Hi,
i've this code aspx and vbnet 2010:

how can I start the progressbar simultaneously upload the file? calculate the actual file transfer?
<form id="form1" runat="server"
    style="font-family: Verdana; font-size: small; background-image: url('Image/Upload.jpg'); background-repeat: no-repeat; width: 640px; height: 480px">
    <div>
         <telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
        </telerik:RadScriptManager>
                     <br />
        <table style="border: 0px; margin: 0px; padding: 0px; width: 100%">
            <tr>
                <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center;">
                 </td>  
            </tr>
            <tr>
                <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center;">
                     </td>
            </tr>
            <tr>
                <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center;">
                     </td>
            </tr>
            <tr>
                <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center;">
                    <telerik:RadUpload ID="RadUpload1" Runat="server"
                        AllowedFileExtensions="jpg,jpeg,png,gif" OverwriteExistingFiles="True"
                        TargetFolder="public/image_profile" ControlObjectsVisibility="None"
                        InputSize="50" Height="22px" style="text-align: left" Skin="Sunset">
                        <Localization Select="Cerca" />
                    </telerik:RadUpload>
                        <asp:CustomValidator ID="CustomValidator1" runat="server"
                        ErrorMessage="File errato" ClientValidationFunction="validateRadUpload" OnServerValidate="CustomValidator1_ServerValidate" ForeColor="Red"></asp:CustomValidator>
                    <div style="font-size:x-small">Il file deve avere le seguenti estensioni: .jpg, .jpeg, .png
                    </div>
                    <div>
                    </div>
                    <telerik:RadButton ID="RadButton1" runat="server"
                        Text="Avvia trasferimento" Skin="Sunset">
                    </telerik:RadButton>
            <script type="text/javascript">
                function validateRadUpload(source, e) {
                    e.IsValid = false;
                    var upload = $find("<%= RadUpload1.ClientID %>");
                    var inputs = upload.getFileInputs();
                    for (var i = 0; i < inputs.length; i++) {
                        //check for empty string or invalid extension    
                        if (inputs[i].value != "" && upload.isExtensionValid(inputs[i].value)) {
                            e.IsValid = true;
                            break;
                        }
                    }
                }
            </script>
                </td>
            </tr>
            <tr>
                <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center;">
                <div>
                </div>
                    <asp:Label ID="Label1" runat="server" Text="Nessun file caricato"
                        ForeColor="Green"></asp:Label>
                    <asp:Repeater ID="Repeater1" runat="server" Visible="False">
                                        <HeaderTemplate>
                                        <div style="color: green">
                                        File caricato:</div>
                                        </HeaderTemplate>
                                        <ItemTemplate>
                                            <%#DataBinder.Eval(Container.DataItem, "FileName")%>
                                            <%#DataBinder.Eval(Container.DataItem, "ContentLength").ToString() + " bytes"%>
                                            <br />
                                        </ItemTemplate>
                    </asp:Repeater>
                </td>
            </tr>
            <tr>
                <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center;">
                    <telerik:RadProgressManager ID="RadProgressManager1" runat="server" />
                    <telerik:RadProgressArea ID="RadProgressArea1" Runat="server"  ProgressIndicators="FilesCountBar, FilesCount, FilesCountPercent, SelectedFilesCount, CurrentFileName">
                            <Localization Uploaded="Trasferito" CurrentFileName="Trasferimento file:"
                            EstimatedTime="Tempo stimato:" Total="Totale " TotalFiles="Totale files: "
                            TransferSpeed="Velocità: " UploadedFiles="File trasferiti:"></Localization>
                    </telerik:RadProgressArea>
                </td>
            </tr>
            <tr>
                <td style="border-style: none; border-color: inherit; border-width: 0px; margin: 0px; padding: 0px; text-align: center;">
                <div>
                </div>
                    <asp:ImageButton ID="Imgbtnesci" runat="server"
                        ImageUrl="~/Image/esci1.png" ValidationGroup="esci" />
                </td>
            </tr>
        </table>
    </div>
    </form>
Protected Sub RadButton1_Click(sender As Object, e As System.EventArgs) Handles RadButton1.Click
        If RadUpload1.UploadedFiles.Count > 0 Then
            UpdateProgressContext()
            Repeater1.DataSource = RadUpload1.UploadedFiles
            Repeater1.DataBind()
            Label1.Visible = False
            Repeater1.Visible = True
        Else
            Label1.Visible = True
            Repeater1.Visible = False
        End If
    End Sub
    Private Sub UpdateProgressContext()
        Const total As Integer = 100
 
        Dim progress As RadProgressContext = RadProgressContext.Current
        progress.Speed = "N/A"
 
        For i As Integer = 0 To total - 1
            progress.PrimaryTotal = 1
            progress.PrimaryValue = 1
            progress.PrimaryPercent = 100
 
            progress.SecondaryTotal = total
            progress.SecondaryValue = i
            progress.SecondaryPercent = i
 
            progress.CurrentOperationText = "Step " & i.ToString()
 
            If Not Response.IsClientConnected Then
                Exit For
            End If
            progress.TimeEstimated = (total - i) * 100
            System.Threading.Thread.Sleep(100)
        Next
    End Sub
 
    Protected Sub CustomValidator1_ServerValidate(source As Object, e As System.Web.UI.WebControls.ServerValidateEventArgs) Handles CustomValidator1.ServerValidate
        e.IsValid = (RadUpload1.InvalidFiles.Count = 0)
    End Sub


Kate
Telerik team
 answered on 30 Nov 2012
1 answer
115 views
Have problem to load my TreeView using "Public Sub buildTree()" and InitialPageLoad...
What can I possibly do wrong ....

    <telerik:RadAjaxManager ID="RadAjaxManager1" OnAjaxRequest="RadAjaxManager1_AjaxRequest" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadAjaxManager1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="PanelLoad" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
        <ClientEvents OnRequestStart="RequestStart" OnResponseEnd="ResponseEnd" />
    </telerik:RadAjaxManager>
 
    <telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
        <script type="text/javascript">
            function RequestStart(sender, eventArgs) {
                $get("<%=modalDiv.ClientID %>").style.display = "block";
            }
 
            function ResponseEnd(sender, eventArgs) {
                $get("<%=modalDiv.ClientID %>").style.display = "none";
            }
 
            function pageLoad(sender, eventArgs) {
                if (!eventArgs.get_isPartialLoad()) {
                    $find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("InitialPageLoad");
                }
            }
        </script>
    </telerik:RadCodeBlock>
 
<asp:Panel ID="PanelLoad" Visible="False" Style="padding-left: 6px; padding-top:6px;" runat="server">
My TreeView databind using the "Public Sub buildTree()"
</asp:Panel>
 
    <div id="modalDiv" style="position: absolute; top: 40px; left: 0px; height: 3000px; width: 100%; z-index: 100; background: gray; display: none; opacity: 0.3; filter: alpha(opacity=100);" runat="server" />
Protected
Sub RadAjaxManager1_AjaxRequest(ByVal sender As Object, ByVal e As Telerik.Web.UI.AjaxRequestEventArgs)
    If e.Argument = "InitialPageLoad" Then
        'System.Threading.Thread.Sleep(3000)
        PanelLoad.Visible = True
    End If
End Sub
 
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
    If Not Page.IsPostBack Then
        buildTree()
    End If
End Sub
 
'....................................
 
Public Sub buildTree()
 
    Dim MyConnection As New SqlConnection(System.Configuration..................
    Dim MyDataAdapter As New SqlDataAdapter("select NodeId, ParentNodeId................
 
    Dim DS As New DataSet()
    MyDataAdapter.Fill(DS)
 
    DS.Relations.Add("NodeRelation",...........
Marin
Telerik team
 answered on 30 Nov 2012
1 answer
149 views
I am currently attempting to use the RadScheduler component in a slightly different manner than is prescribed or given in all the examples i have seen. What i want to do is use the RadScheduler as a resource allocator for frequency instead of time. To do this, i need to customize the hours column to show whatever frequency values i am allocating instead of time. Is there any way to override the time being displayed and use custom text instead? I do not necessarily need the RadScheduler to handle integer values for frequency instead of time, i just need to be able modify the time displayed.

Thanks & Regards,
Matt C
Plamen
Telerik team
 answered on 30 Nov 2012
1 answer
83 views
I am using a Grid with 3 columns(3 labels). I changed the text of the first column through Javascript. I wanted to access the updated grid from the code behind. The changes made at the client side is not visible at the server side. How can we achieve this?
Jayesh Goyani
Top achievements
Rank 2
 answered on 30 Nov 2012
3 answers
321 views
I have a button image in a radGrid.  When the button image clicked I want to display a RadWindow.  But before I display the RadWindow I need to populate a datagrid contained in the RadWindow.

Radwindow
<telerik:RadWindow runat="server" ID="rwBulletins"
    RestrictionZoneID="ContentTemplateZone"  Modal="true" Width=700 Height=400
    Skin="Web20">
    <ContentTemplate>
 
    <asp:panel ID="pnlBulletin" runat="server" Width=700 BackColor="White" ForeColor="Black" BorderColor=Black BorderWidth=5 >
            <table>
                <tr>
                    <td>s
                        <b><asp:Label ID="Label10" runat="server"  Text="Bulletins" /></b>
                        <hr />
                    </td>
                </tr>
            <tr><td align="left">
                    <asp:panel ID="pnlBulletinBody" runat="server" ScrollBars=Vertical Height=400 Width=700  >
                        <table>
                            <tr>
                                <td>
                                    <asp:DataGrid ID="dgBulletins" runat="server" AutoGenerateColumns="false" >
                                        <AlternatingItemStyle BackColor="White" />
                                         
                                        <Columns>
                                            <asp:BoundColumn DataField="Description" HeaderText="Description" />
                                            <asp:TemplateColumn HeaderText="Author/Date">
                                                <ItemTemplate>
                                                    <%# Eval("Author") %><br />
                                                    <%# Eval("CreationDate") %>
                                                </ItemTemplate>
                                            </asp:TemplateColumn>
                                        </Columns>
                                    </asp:DataGrid>
                                    <br /><br />
                                    <asp:Label ID="lbBulletinParent" runat="server" />
                                </td>
                            </tr>
                        </table>       
                    </asp:panel>
                </td>
             </tr>
         </table>
    </asp:panel>
    </ContentTemplate>
</telerik:RadWindow>


I have tried using a static server button click handler where I populate the grid, but I can't get the RadWindow to display when I use the

VisibleOnPageLoad property.  (It does show if I cause another postback.  Am I missing an autopostback property setting somewhere?)

Image Button in RadGrid

<telerik:GridTemplateColumn HeaderText="Bulletins" ItemStyle-HorizontalAlign="Center" >
    <ItemTemplate>
        <asp:ImageButton ID="ibtnBulletin" CommandName="Bulletin" runat="server"
            ImageUrl='<%#BulletinImage(Eval("ClientID")) %>'  
            Onclick="ibtnBulletin_Click" />
    </ItemTemplate>
</telerik:GridTemplateColumn>

Image Button Handler

Protected Sub ibtnBulletin_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
    Dim ibtn As ImageButton = CType(sender, ImageButton)
    Dim dgi As Telerik.Web.UI.GridDataItem = ibtn.Parent.Parent
 
    Dim ClientID As String = dgi.Cells(4).Text
    dgBulletins.DataSource = clsBulletins.GetBulletinsByClientandReseller(ClientID)
    dgBulletins.DataBind()
 
    rwBulletins.VisibleOnPageLoad = True
 
End Sub

I also tried calling a javascript function from the image button to display the RadWindow which works in displaying the RadWindow, but I couldn't figure out how to call the routine to populate the grid from the javascript.  So if that's a better approach I'm open to that.  Here's how that call looked so far:

<telerik:GridTemplateColumn HeaderText="Bulletins" ItemStyle-HorizontalAlign="Center" >
    <ItemTemplate>
        <asp:ImageButton ID="ibtnBulletin" CommandName="Bulletin" runat="server"
            ImageUrl='<%#BulletinImage(Eval("ClientID")) %>'
            OnClientClick="openWinContentTemplate(); return false;" />
    </ItemTemplate>
</telerik:GridTemplateColumn>

And here's the javascript component:

<script type="text/javascript">
    function openWinContentTemplate() {
        $find("<%=rwBulletins.ClientID %>").show();
    }
 
</script>

Thanks for any help on this.

 

 

Rumen
Telerik team
 answered on 30 Nov 2012
1 answer
76 views
How can i minimize the vertical spacing between the radtreenodes.
Princy
Top achievements
Rank 2
 answered on 30 Nov 2012
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?