Hello,
I can not add an icon to the radcloudUpload button as I do with radbutton.
Can you explain me how to do if it is feasible ?
Thank you
Vince
Hi I have been trying to get the image manager (within the RadEditor) working correctly within my application but with no luck. I am trying to use a shared folder as the path for the images using a virtual folder configured in IIS but again with no luck but I don't understand why not. I have followed every guide I could find on this site but none of these seem to work. I have successfully configured the virtual directory and the account running the web page has access to the folder as I have used the following code and tried to change the folder to somewhere else and that gave me the javascript alert but my current setup does not.
The following gives no error but the upload button is greyed out on the deployed site.
string[] imagePath = { "/Images" };
whereas the following throws the javascript error saying it cannot access the directory but works on localhost when developing.
string[] imagePath = { "~/Images" };
private void FullPermissionsTest(string testPhysicalPath)
{
try
{
string physicalPathToTestFolder = System.IO.Path.Combine(testPhysicalPath, "TestDirectory");
System.IO.DirectoryInfo testDir = System.IO.Directory.CreateDirectory(physicalPathToTestFolder);// Create folder
testDir.GetDirectories();// List folders
string testFilePath = System.IO.Path.Combine(testDir.FullName, "TestFile1.txt");// test file paths
System.IO.File.Create(testFilePath).Close();// Create a file
testDir.GetFiles("*.*");// List files
System.IO.File.OpenRead(testFilePath).Close();// Open a file
System.IO.File.Delete(testFilePath);// delete the test file
System.IO.Directory.Delete(physicalPathToTestFolder);// delete the test folder
}
catch (Exception ex)
{// Show the probelm
string message = ex.Message;
string script = string.Format("alert('{0}');", message.Replace("'", @""""));
ScriptManager.RegisterStartupScript(this.Page, this.Page.GetType(), "KEY", script, true);
}
}
I have attached a screenshot of the setup of my virtual folder please could someone help with this as it is currently holding up go live of a project.
Unhandled exception at line 15, column 16485 in http://localhost:60000/Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=RadScriptManager1_TSM&compress=1&_TSM_CombinedScripts_=;;<
br
>System.Web.Extensions,+Version=4.0.0.0,+Culture=neutral,+PublicKeyToken=31bf3856ad364e35:de-DE:fa6755fd-da1a-49d3-9eb4-1e473e780ecd:ea597d4b:b25378d2;Telerik.Web.UI,<
br
>+Version=2014.1.403.45,+Culture=neutral,+PublicKeyToken=121fae78165ba3d4:de-DE:68d9452f-f268-45b2-8db7-8c3bbf305b8d:16e4e7cd:365331c3:ed16cbdc:88144a7a:24ee1bba:<
br
>92fe8ea0:fa31b949:19620875:874f8ea2:f46195d3:490a9d4e:bd8f85e4:cda80b3:7165f74:383e4ce8:e330518b:1e771326:8e6f0d33:94ee8691
0x800a139e - Laufzeitfehler in JavaScript: Sys.WebForms.PageRequestManagerServerErrorException: Fehler beim Laden des Ansichtszustands. <
br
>Die Steuerelementstruktur, in die der Ansichtszustand geladen werden soll, muss mit der Steuerelementstruktur übereinstimmen, <
br
>die während der letzten Anforderung zum Speichern des Ansichtszustands verwendet wurde. <
br
>Beim dynamischen Hinzufügen von Steuerelementen müssen die während eines Sendevorgangs hinzugefügten Steuerelemente z.B. <
br
>in Typ und Position mit den während der ursprünglichen Anforderung hinzugefügten Steuerelementen übereinstimmen.
Hi,
When setting ShowIcon="true" and using Classing render mode, you can click on the entire area to toggle the picker.
But when setting render mode to Lightweight, the area where the color is displayed is not clickable to toggle the picker!
Clicking on the arrow still works to toggle...
Example:
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="colorpicker.aspx.vb" Inherits="TestaTredjepartWeb.colorpicker" %>
<!DOCTYPE html>
<
html
>
<
head
runat
=
"server"
>
<
title
></
title
>
</
head
>
<
body
>
<
form
id
=
"form1"
runat
=
"server"
>
<
asp:ScriptManager
ID
=
"s"
runat
=
"server"
>
</
asp:ScriptManager
>
<
div
>
<
telerik:RadColorPicker
ID
=
"cp"
runat
=
"server"
ShowIcon
=
"true"
RenderMode
=
"Lightweight"
></
telerik:RadColorPicker
>
</
div
>
</
form
>
</
body
>
</
html
>
In this example, nothing happens when clicking on the white area inside the picker!
Regards
Andreas
<
telerik:RadComboBox
ID
=
"rcbLocation"
runat
=
"server"
ClientIDMode
=
"Static"
Height
=
"175px"
Width
=
"200px"
EmptyMessage
=
"Enter Location"
MarkFirstMatch
=
"true"
EnableLoadOnDemand
=
"true"
EnableVirtualScrolling
=
"true"
ShowMoreResultsBox
=
"true"
OnClientItemsRequesting
=
"MDL.Default.requestingItems"
OnClientItemsRequestFailed
=
"Main.radComboBoxItemsRequestFailed"
>
<
WebServiceSettings
Path
=
"Default.aspx"
Method
=
"GetMatchingLocations"
/>
</
telerik:RadComboBox
>
Hi there,
I have tried to follow the demo you have online to produce a "schedule" of activity by databinding a list to the RadScheduler datasource. I would like to have these activities grouped by employee.
However, i can either display my list as I wish to in your scheduler but I can not use the groupheader OR I can use the groupheader but none of my activities display. Please find enclosed my code.
Thank you,
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ActivityDP.ascx.cs" Inherits="ActivityDP" %>
<telerik:RadScriptManager ID="RadScriptManager1" Runat="server">
</telerik:RadScriptManager>
<telerik:RadSkinManager ID="RadSkinManager1" Runat="server">
</telerik:RadSkinManager>
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
</telerik:RadAjaxManager>
<telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" Runat="server"
Skin="Default">
</telerik:RadAjaxLoadingPanel>
<telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" height="337px"
width="1147px">
<div class="demo-container no-bg">
<telerik:RadScheduler ID="RadScheduler1" runat="server" GroupBy="Employee" GroupingDirection="Horizontal"
OnNavigationCommand="RadScheduler1_NavigationCommand" DataSourceID="EventsDataSource"
AppointmentStyleMode="Default" Subject="Subject"
FirstDayOfWeek="Monday" LastDayOfWeek="Sunday"
DataStartField="StartTime" DataEndField="FinishTime"
SelectedView="DayView"
OverflowBehavior="Auto" DataKeyField="EmployeeID">
<AdvancedForm Modal="true"></AdvancedForm>
<MonthView UserSelectable="false"></MonthView>
<TimelineView />
<%--<ResourceHeaderTemplate>
<asp:Panel ID="ResourceImageWrapper" runat="server" CssClass="ResCustomClass">
<asp:Image ID="SpeakerImage" runat="server" AlternateText='<%# Eval("Text") %>'></asp:Image>
</asp:Panel>
</ResourceHeaderTemplate>--%>
<ResourceTypes>
<telerik:ResourceType KeyField="EmployeeID" Name="Employee" TextField="Employee" ForeignKeyField="EmployeeID"
DataSourceID="SpeakersDataSource"></telerik:ResourceType>
</ResourceTypes>
<%-- <ResourceStyles>
<telerik:ResourceStyleMapping Type="Employee" Key="1" BackColor="#eb901b"></telerik:ResourceStyleMapping>
<telerik:ResourceStyleMapping Type="Employee" Key="2" BackColor="#8fd21b"></telerik:ResourceStyleMapping>
<telerik:ResourceStyleMapping Type="Employee" Key="3" BackColor="#278ce9"></telerik:ResourceStyleMapping>
<telerik:ResourceStyleMapping Type="Employee" Key="4" BackColor="#f14db2"></telerik:ResourceStyleMapping>
</ResourceStyles>--%>
<TimeSlotContextMenuSettings EnableDefault="true"></TimeSlotContextMenuSettings>
<AppointmentContextMenuSettings EnableDefault="true"></AppointmentContextMenuSettings>
</telerik:RadScheduler>
</div>
</telerik:RadAjaxPanel>
<asp:SqlDataSource ID="SpeakersDataSource" runat="server"
ConnectionString="<%$ ConnectionStrings:Mailshop2kSQLConnectionString %>" SelectCommand="SELECT DISTINCT tblEmployee.EmployeeID, tblJobLogDP.Employee FROM tblEmployee INNER JOIN tblJobLogDP ON tblEmployee.FirstName = tblJobLogDP.Employee ORDER BY tblJobLogDP.Employee;"
>
</asp:SqlDataSource>
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.Data;
using System.Windows.Forms;
public partial class ActivityDP : System.Web.UI.UserControl
{
private const string ProviderSessionKey = "Telerik.Web.Examples.Scheduler.XmlSchedulerProvider.ActivityLog";
private const string AppointmentsKey = "Telerik.Examples.Scheduler.BindToList_Apts";
private DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
HttpContext.Current.Session.Remove(AppointmentsKey);
RadScheduler1.DataKeyField = "ID";
RadScheduler1.DataStartField = "Start";
RadScheduler1.DataEndField = "End";
RadScheduler1.DataSubjectField = "Subject";
RadScheduler1.DataRecurrenceField = "RecurrenceRule";
RadScheduler1.DataRecurrenceParentKeyField = "RecurrenceParentID";
ResourceType rt = new ResourceType("Room");
rt.DataSource = Rooms;
rt.KeyField = "RoomNo";
rt.ForeignKeyField = "RoomNo";
rt.TextField = "RoomName";
RadScheduler1.ResourceTypes.Add(rt);
}
RadScheduler1.GroupBy = "Employee";
RadScheduler1.Rebind();
//MessageBox.Show(RadScheduler1.SelectedDate.ToString());
DateTime sd = new DateTime(RadScheduler1.SelectedDate.Year, RadScheduler1.SelectedDate.Month, RadScheduler1.SelectedDate.Day);
ActivityL a = new ActivityL();
//ds = a.getDaysActivityWarehouse(sd.ToString("yyyy/MM/dd"));
ds = a.getDaysDataProcessing(sd.ToString("yyyy/MM/dd"));
//RadScheduler1.DataSource = Appointments;
}
private List<AppointmentInfo> Appointments
{
get
{
//List<AppointmentInfo> sessApts = HttpContext.Current.Session[AppointmentsKey] as List<AppointmentInfo>;
List<AppointmentInfo> sessApts = new List<AppointmentInfo>();
for (int i = 0; i < ds.Tables[0].Rows.Count - 1; i++)
{
AppointmentInfo ai = new AppointmentInfo(ds.Tables[0].Rows[i][0].ToString() + " : " + ds.Tables[0].Rows[i][4].ToString() + "-" + ds.Tables[0].Rows[i][5].ToString() + Environment.NewLine + Environment.NewLine + ds.Tables[0].Rows[i][6].ToString());
DateTime value = new DateTime(DateTime.Parse(ds.Tables[0].Rows[i][2].ToString()).Year, DateTime.Parse(ds.Tables[0].Rows[i][2].ToString()).Month, DateTime.Parse(ds.Tables[0].Rows[i][2].ToString()).Day, DateTime.Parse(ds.Tables[0].Rows[i][2].ToString()).Hour, DateTime.Parse(ds.Tables[0].Rows[i][2].ToString()).Minute, DateTime.Parse(ds.Tables[0].Rows[i][2].ToString()).Second);
ai.Start = value;
//MessageBox.Show(ds.Tables[0].Rows[i][3].ToString());
var temp = DateTime.Now;
if ((!DBNull.Value.Equals(ds.Tables[0].Rows[i][3].ToString())) && (ds.Tables[0].Rows[i][3].ToString().Length > 0))
{
// MessageBox.Show(ds.Tables[0].Rows[i][3].ToString());
temp = DateTime.Parse(ds.Tables[0].Rows[i][3].ToString());
}
else
{
temp = DateTime.Now;
}
DateTime valuee = new DateTime(temp.Year, temp.Month, temp.Day, temp.Hour, temp.Minute, temp.Second);
ai.End = valuee;
ai.ID = ds.Tables[0].Rows[i][7].ToString();
ai.RoomNo = assignCSR(ds.Tables[0].Rows[i][0].ToString());
ai.RecurrenceParentID = i.ToString();
ai.EmployeeID = ds.Tables[0].Rows[i][8].ToString();
sessApts.Add(ai);
}
if (sessApts == null)
{
sessApts = new List<AppointmentInfo>();
HttpContext.Current.Session[AppointmentsKey] = sessApts;
}
return sessApts;
}
}
protected void RadScheduler1_NavigationCommand(object sender, SchedulerNavigationCommandEventArgs e)
{
if (e.Command == SchedulerNavigationCommand.SwitchToTimelineView)
{
RadScheduler1.RowHeight = 50;
}
else
{
RadScheduler1.RowHeight = 20;
}
}
private int assignCSR(string name)
{
switch (name)
{
case "Tony":
return 1;
case "Sean":
return 2;
case "Larry":
return 3;
case "Jerry":
return 4;
case "Jacquie":
return 5;
default:
return 6;
}
}
private List<RoomInfo> Rooms
{
get
{
List<RoomInfo> roomList = new List<RoomInfo>();
roomList.Add(new RoomInfo(1, "Tony"));
roomList.Add(new RoomInfo(2, "Sean"));
roomList.Add(new RoomInfo(3, "Larry"));
roomList.Add(new RoomInfo(4, "Jerry"));
roomList.Add(new RoomInfo(5, "Jacquie"));
roomList.Add(new RoomInfo(6, "Blaine"));
return roomList;
}
}
private AppointmentInfo FindById(string ID)
{
foreach (AppointmentInfo ai in Appointments)
{
if (ai.ID == ID)
{
return ai;
}
}
return null;
}
//protected void RadScheduler1_DataBound(object sender, EventArgs e)
//{
// // Turn off the support for multiple resource values.
// foreach (ResourceType resType in RadScheduler1.ResourceTypes)
// {
// resType.AllowMultipleValues = false;
// }
//}
//protected void RadScheduler1_AppointmentCreated(object sender, AppointmentCreatedEventArgs e)
//{
// if (e.Appointment.RecurrenceState == RecurrenceState.Master || e.Appointment.RecurrenceState == RecurrenceState.Occurrence)
// {
// Panel recurrenceStateDiv = new Panel();
// recurrenceStateDiv.CssClass = "rsAptRecurrence";
// e.Container.Controls.AddAt(0, recurrenceStateDiv);
// }
// if (e.Appointment.RecurrenceState == RecurrenceState.Exception)
// {
// Panel recurrenceStateDiv = new Panel();
// recurrenceStateDiv.CssClass = "rsAptRecurrenceException";
// e.Container.Controls.AddAt(0, recurrenceStateDiv);
// }
//}
protected void RadScheduler1_AppointmentInsert(object sender, SchedulerCancelEventArgs e)
{
Appointments.Add(new AppointmentInfo(e.Appointment));
}
protected void RadScheduler1_AppointmentUpdate(object sender, AppointmentUpdateEventArgs e)
{
AppointmentInfo ai = FindById(e.ModifiedAppointment.ID.ToString());
ai.CopyInfo(e.ModifiedAppointment);
}
protected void RadScheduler1_AppointmentDelete(object sender, AppointmentDeleteEventArgs e)
{
Appointments.Remove(FindById(e.Appointment.ID.ToString()));
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.Web.UI;
using System.Data.OleDb;
using System.Data;
/// <summary>
/// Summary description for AppointmentInfo
/// </summary>
public class AppointmentInfo
{
private string id;
private string subject;
private DateTime start;
private DateTime end;
private string recurParentID;
private string recurData;
private int room;
private string employeeID;
public string EmployeeID
{
get { return employeeID; }
set { employeeID = value; }
}
public string ID
{
get { return id; }
set { id = value; }
}
public string Subject
{
get { return subject; }
set { subject = value; }
}
public DateTime Start
{
get { return start; }
set { start = value; }
}
public DateTime End
{
get { return end; }
set { end = value; }
}
public string RecurrenceRule
{
get { return recurData; }
set { recurData = value; }
}
public string RecurrenceParentID
{
get { return recurParentID; }
set { recurParentID = value; }
}
public int RoomNo
{
get { return room; }
set { room = value; }
}
private AppointmentInfo()
{
this.id = Guid.NewGuid().ToString();
}
public AppointmentInfo(string subject, DateTime start, DateTime end)
: this()
{
this.subject = subject;
this.start = start;
this.end = end;
}
public AppointmentInfo(string subject)
: this()
{
this.subject = subject;
}
public AppointmentInfo(Appointment source)
: this()
{
CopyInfo(source);
}
public void CopyInfo(Appointment source)
{
subject = source.Subject;
start = source.Start;
end = source.End;
recurData = source.RecurrenceRule;
if (source.RecurrenceParentID != null)
recurParentID = source.RecurrenceParentID.ToString();
Resource r = source.Resources.GetResourceByType("Room");
if (r != null)
room = (int) r.Key;
}
public void getDaysActivityWarehouse()
{
OleDbConnection con = new OleDbConnection();
OleDbDataAdapter da = default(OleDbDataAdapter);
DataSet ds = new DataSet();
//con.ConnectionString = "PROVIDER=Microsoft.Jet.OLEDB.4.0;Data Source = C:\\Program Files\\Mail-Shop\\MSApp2k.mdb";
con.ConnectionString = "Provider=SQLOLEDB;Data Source=192.168.1.100,1433;Database=Mailshop2kSQL;Uid=sa;Pwd=1idrs!temp99;";
con.Open();
string sql = "SELECT tblEmployee.FirstName, tblJobCost.JobDate, tblJobCost.StartTime, tblJobCost.StopTime " +
"FROM (tblJobCostEmployee INNER JOIN tblJobCost ON tblJobCostEmployee.JobCostID = tblJobCost.JobCostID) INNER JOIN tblEmployee ON tblJobCostEmployee.EmployeeID = tblEmployee.EmployeeID " +
"WHERE (((tblJobCost.JobDate)='9/30/2015')) " +
"ORDER BY tblEmployee.FirstName;";
da = new OleDbDataAdapter(sql, con);
da.Fill(ds, "stats");
con.Close();
}
class RoomInfo
{
private int id;
private string name;
public int RoomNo
{
get { return id; }
}
public string RoomName
{
get { return name; }
}
public RoomInfo(int id, string name)
{
this.id = id;
this.name = name;
}
}
}
​​