Telerik Forums
UI for ASP.NET AJAX Forum
0 answers
103 views
Does anyone have a working code example to open a RadUpload in a RadWindow from a button click event or a grid insert command? VB would be the preferred but I will convert from C# if I have too.

Thanks in advance

Dan
codispdp
Top achievements
Rank 1
 asked on 14 Nov 2008
7 answers
530 views


Hi,

I want to Change the Rad Schedular Week end Days.  One of my Clients from Saudi Arabia requires that the week end should be fall in the Friday.


I try to set FirstDayOfWeek  but It's making Error.


How can I set pls let me know.


Thanks for your help


Simon
Telerik team
 answered on 14 Nov 2008
2 answers
181 views
Does anyone know why RadTreeView would take 1.5 seconds to postback in a page, when regular TreeView takes .5 seconds?  This doesn't happen in a simple demo project, just in my application page.  What might be in my page that would cause postback to get delayed?

Thanks!
Andrew
Andrew
Top achievements
Rank 1
 answered on 14 Nov 2008
1 answer
72 views

 

Hi Telerik,
i have few questions about Chart and telerik:

And Her are questions about Chart.

  • Is it possible to draw a second X Axis on the top of Chart area.
  • Is it possible to make ajax call to codebehind when the user moves the mouse over (Tick mark)points on the second X Axis.
Giuseppe
Telerik team
 answered on 14 Nov 2008
3 answers
93 views
This is for RadControls for ASP.NET AJAX Q3 2008.

I need to determine, in Javascript, if an upload is currently being processed.  Is there a method to accomplish this easily?

Thanks,

David
Erjan Gavalji
Telerik team
 answered on 14 Nov 2008
2 answers
117 views
Hi

I have a grid that containt 2 user controls in the EditTemplate, one displays some info associated in a radgrid and the other is a radupload to upload some file to the the server. Each user controls contains a RadAjaxManagerProxy and the ASPX page contains a RadAjaxManager. My problem is that in some situation like sorting the grid and moving pages, the content of my radUpload include in the other user control simply disappears, so the user need to add the files to upload again. Is there a normal things that the content always disappears of it is simply my AjaxManager proxy that is not well configured ???  How i can keep theses values in the radupload control ???

If you need more details , please let me know.

Thanks in advance for your help.

Dominic
Top achievements
Rank 2
 answered on 14 Nov 2008
1 answer
115 views
Hi
I am not able compile the project because the following errors:

Name of space for the name or type 'Uploadedfiles' can not be found. Need a using directive or a reference to number of modules (assembly)?
Validation(ASP.Net):Attribute 'LocalizationPath' is not valid attribute of element 'RadUpload'.
Validation(ASP.Net):Attribute 'SkinPath' is not valid attribute of element 'RadUpload'.

the code:

(default.aspx.cs)

using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

using System.Drawing;
using Telerik.Web;
using Telerik.Web.UI.Upload;
using Telerik;
using Telerik.Charting;


public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        statusLabel.Text = "";
        errorLabel.Text = "";
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        try
        {


            if (RadUpload1.UploadedFiles.Count > 0)
            {
                string message = "<br />The following files are upload successfully <br />";
                foreach (UploadedFile file in RadUpload1.UploadedFiles)
                {
                    message += file.GetName() + "<br />";
                    file.SaveAs(@"c:\MyUploadDir\" + file.GetName(), true);
                }
                DisplayMessage(message, false);
            }

            if (RadUpload1.InvalidFiles.Count > 0)
            {
                string error = "<br />The following files are not allowed for upload<br />";
                foreach (UploadedFile ifile in RadUpload1.InvalidFiles)
                {
                    error += ifile.GetName() + "<br />";
                }

                DisplayMessage(error, true);
            }
        }

        catch (Exception ex)
        {
            DisplayMessage("Upload failed" + ex.Message, true);
        }
    }
      
    private void DisplayMessage(string text, bool isError)
        {
            if(isError)
            {
            this.errorLabel.ForeColor = Color.Red;
            this.errorLabel.Text = text;
            }
            else
            {
            this.statusLabel.ForeColor = Color.Green;
            this.statusLabel.Text = text;
            }
        }
   
    protected void RadUpload1_ValidatingFile(object sender, ValidateFileEventArgs e)
    {
        int maxZip = 10485760;//10MB
        int maxText = 4096;//4KB
        int maxJpg = 512000;//500kb

        switch(e.UploadedFile.GetExtension().ToLower())
        {
        case ".zip":
            if (e.UploadedFile.ContentLength>maxZip)
                e.IsValid=false;
            e.SkipInternalValidation=true;
            break;
        case ".txt":
            if(e.UploadedFile.ContentLength>maxText)
                e.IsValid=false;
            e.SkipInternalValidation=true;
            break;
        case ".jpg":
            if(e.UploadedFile.ContentLength>maxJpg)
                e.IsValid=false;
            e.SkipInternalValidation=true;
            break;
        }
    }
}

(default.aspx)

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

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

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        <div>
            <table>
        <tr>
        <td>
        
        <Telerik:RadUpload ID="RadUpload1" runat="server" LocalizationPath="RadControls/Upload//Localization" SkinPath="~/RadControls/Upload/Skins" ControlObjectsVisibility="All" TargetFolder="~/MyUploadFiles" OnValidatingFile="RadUpload1_ValidatingFile" MaxFileSize="1024" />
        </td>
        <td align="right">
        <asp:Label ID="statusLabel" runat="server"></asp:Label>
        <asp:Label ID="errorLabel" runat="server"></asp:Label>
        <asp:Button ID="Button1" runat="server" Text="Upload" OnClick="Button1_Click" />
        </td>
        </tr>
       
        </table>
        
        </div>
    </form>
</body>
</html>

What is the solution?
Erjan Gavalji
Telerik team
 answered on 14 Nov 2008
2 answers
90 views
I have an edit window(pop up) that allows a user to create or edit a few fields.  Access to this window either comes from selecting a record in a grid to edit or a create new record link.

If I select a previous record to edit, close the window and then click on the Create New Record link, the previous record's data is displayed momentary and then the correct empty fields are displayed. What is the proper way to not show any previous data?



dtrumbower
Top achievements
Rank 1
 answered on 14 Nov 2008
1 answer
90 views
I need to read controld on the parent page from the radwindow page. Does anyone have a link to some sample code or another post or article on that?

Thanks
Georgi Tunev
Telerik team
 answered on 14 Nov 2008
8 answers
270 views
I found your sample for setting the cssClass by Subject but I need to set it according to one of the resource ID's.

Here is the sample code from your documentation
Protected Sub RadScheduler1_AppointmentCreated(sender As Object, e As Telerik.Web.UI.AppointmentCreatedEventArgs)
   Select Case e.Appointment.Subject
      Case "McGregor"
         e.Appointment.CssClass = "McGregorStyle"
      Case "John Doe"
         e.Appointment.CssClass = "JDStyle"
      Case "Smith"
         e.Appointment.CssClass = "SmithStyle"
      Case "Anderson"
         e.Appointment.CssClass = "AndersonStyle"
      Case Else
   End Select
End Sub 'RadScheduler1_AppointmentCreated

My Appointment table schema is the standard demo table with the following added fields
Appointment
- AppointmentID
- Subject
- StartDate
- EndDate
- RecurrenceRule
- RecurrenceParentID
- LocationID
- RoomID
- GroupID

related tables
Location
- LocationID
- LocationName

Room
-
RoomID
-
RoomName

Group
-
GroupID
-
GroupName
- GroupColor

I need to set the e.Appointment.cssClass according to the GroupID field. I tried to figure it out but my OOP skills are considerably lacking.

Ideally I want to allow in our admin for the customer to set their own color, using the RadColorPicker, for each Group they create. Since it seems the related table data is also in the scheduler hierachy would it be possible to have it set the color automatically based on a new column Group.GroupColor field?

Rubihno
Top achievements
Rank 1
 answered on 14 Nov 2008
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?