Telerik Forums
UI for ASP.NET AJAX Forum
3 answers
132 views
I have a problem using a rowheight lower than 16.
The appointments in the radscheduler appear smaller than they are and when i resize an appointment it becomes smaller than i really resize.
Peter
Telerik team
 answered on 23 Nov 2010
7 answers
87 views
Hello,

At the moment i have a scheduler inplemented in my application. I made it exactly as in the examples is described. The problem is at the moment, that when there are appointments on the overview, pointing to different timeslots is workign kinda laggy and slow. it takes a while before it lights up the timeslot of one hour where i have my mouse on it. I searched the Telerik forum, for performance problems and im already using the radscriptmanager as well the radstylesheetmanager.

My code is below:
<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="ucQuickPlan.ascx.cs"
    Inherits="VEGAS_HPF.Hoofdmenu.Agenda.ucQuickPlan" %>
<%@ Register Src="AdvancedForm.ascx" TagName="AdvancedForm" TagPrefix="scheduler" %>
<style type="text/css">
    .RadScheduler .rsAptSubject
    {
        text-align: left;
        padding: 4px 0 1px;
        margin: 0 0 3px;
        font-size: 12px;
        font-weight: bold;
        color: #369;
        height: 17px;
        border-bottom: 1px solid #99DEFD;
        width: 100%;
    }
    .RadScheduler .rsAdvancedEdit .RadColorPicker label
    {
        text-align: left;
        display: block;
        padding: 0;
    }
</style>
  
<script type="text/javascript">
    //<![CDATA[
  
    // Dictionary containing the advanced template client object
    // for a given RadScheduler instance (the control ID is used as key).
    var schedulerTemplates = {};
  
    function schedulerFormCreated(scheduler, eventArgs) {
        // Create a client-side object only for the advanced templates
        var mode = eventArgs.get_mode();
        if (mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert ||
                    mode == Telerik.Web.UI.SchedulerFormMode.AdvancedEdit) {
            // Initialize the client-side object for the advanced form
            var formElement = eventArgs.get_formElement();
            var templateKey = scheduler.get_id() + "_" + mode;
            var advancedTemplate = schedulerTemplates[templateKey];
            if (!advancedTemplate) {
                // Initialize the template for this RadScheduler instance
                // and cache it in the schedulerTemplates dictionary
                var schedulerElement = scheduler.get_element();
                var isModal = scheduler.get_advancedFormSettings().modal;
                advancedTemplate = new window.SchedulerAdvancedTemplate(schedulerElement, formElement, isModal);
                advancedTemplate.initialize();
  
                schedulerTemplates[templateKey] = advancedTemplate;
  
                // Remove the template object from the dictionary on dispose.
                scheduler.add_disposing(function() {
                    schedulerTemplates[templateKey] = null;
                });
            }
  
            // Are we using Web Service data binding?
            if (!scheduler.get_webServiceSettings().get_isEmpty()) {
                // Populate the form with the appointment data
                var apt = eventArgs.get_appointment();
                var isInsert = mode == Telerik.Web.UI.SchedulerFormMode.AdvancedInsert;
                advancedTemplate.populate(apt, isInsert);
            }
        }
    }
  
    //]]>
</script>
  
<telerik:RadScheduler runat="server" ID="RadScheduler1" Width="750px" OnDataBound="RadScheduler1_DataBound"
    OnAppointmentDataBound="RadScheduler1_AppointmentDataBound" OnClientFormCreated="schedulerFormCreated"
   EnableDescriptionField="true" AppointmentStyleMode="Default"
    OnDataBinding="RadScheduler1_DataBinding" ayStartTime="08:00:00" DayEndTime="22:00:00" WorkDayStartTime="08:00:00" WorkDayEndTime="22:00:00"
    FirstDayOfWeek="Monday" LastDayOfWeek="Friday" HoursPanelTimeFormat="HH:mm" Height="100%"
    ShowViewTabs="false" Skin="Telerik" StartInsertingInAdvancedForm="true" StartEditingInAdvancedForm="true">
    <AdvancedForm Modal="false" />
    <AdvancedEditTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedEditForm1" Mode="Edit" Subject='<%# Bind("Subject") %>'
            Description='<%# Bind("Description") %>' Start='<%# Bind("Start") %>' End='<%# Bind("End") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
            UserID='<%# Bind("intPersoneelID") %>' RoomID='<%# Bind("intKamerID") %>' />
    </AdvancedEditTemplate>
    <AdvancedInsertTemplate>
        <scheduler:AdvancedForm runat="server" ID="AdvancedInsertForm1" Mode="Insert" Subject='<%# Bind("Subject") %>'
            Start='<%# Bind("Start") %>' End='<%# Bind("End") %>' Description='<%# Bind("Description") %>'
            RecurrenceRuleText='<%# Bind("RecurrenceRule") %>'
            UserID='<%# Bind("intPersoneelID") %>' RoomID='<%# Bind("intKamerID") %>' />
    </AdvancedInsertTemplate>
    <TimelineView UserSelectable="false" />
    <TimeSlotContextMenuSettings EnableDefault="true" />
    <AppointmentContextMenuSettings EnableDefault="true" />
</telerik:RadScheduler>

And the code behind:

public partial class ucQuickPlan : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            //RadScheduler1.ResourceTypes.Add(new ResourceType("User"));
            //RadScheduler1.Resources.Add(new Resource("User", "22", "Alex"));
            //RadScheduler1.Resources.Add(new Resource("User", "24", "Bob"));
  
        }
  
        protected void RadScheduler1_DataBinding(object sender, EventArgs e)
        {
  
  
            string strDateSelected = RadScheduler1.SelectedDate.ToShortDateString();
            //RadScheduler1.DataSource = Agenda_cls.GetAgendaItems(intPersoneelID, strDateSelected);
            RadScheduler1.DataKeyField = "id";
            RadScheduler1.DataStartField = "afspraakdatum";
            RadScheduler1.DataEndField = "afspraakdatumEind";
            RadScheduler1.DataSubjectField = "afspraakopmerkingen";
            //RadScheduler1.GroupBy = "adviseur_id";
            RadScheduler1.GroupingDirection = GroupingDirection.Horizontal;
  
            RadScheduler1.DataSource = cls_VEGAS_HPF.getDataset("exec sp_getAgendaItems", "ConnWB");
  
            RadScheduler1.ResourceTypes.Clear();
  
            DataTable dt_Adviseurs = cls_VEGAS_HPF.getDataTable("Exec sp_HypGetAdviseursInDienst", "ConnHPF");
  
            ResourceType restype1 = new ResourceType("Adviseur");
            restype1.DataSource = dt_Adviseurs;
            restype1.KeyField = "intPersoneelID";
            restype1.TextField = "strNaam";
            restype1.ForeignKeyField = "intPersoneelID";
            RadScheduler1.ResourceTypes.Add(restype1);
  
            DataTable dt_Kamers = cls_VEGAS_HPF.getDataTable("SELECT * FROM tblDLocatieKamer", "ConnHPF");
  
            ResourceType restype2 = new ResourceType("Kamer");
            restype2.DataSource = dt_Kamers;
            restype2.KeyField = "intKamerID";
            restype2.TextField = "strKamerNaam";
            restype2.ForeignKeyField = "intKamerID";
            RadScheduler1.ResourceTypes.Add(restype2);
  
            RadScheduler1.GroupBy = "Adviseur";
        }
  
        protected void RadScheduler1_DataBound(object sender, EventArgs e)
        {
            //RadScheduler1.ResourceTypes.FindByName("User").AllowMultipleValues = true;
            //RadScheduler1.ResourceTypes.FindByName("Room").AllowMultipleValues = false;
        }
  
        protected void RadScheduler1_AppointmentDataBound(object sender, SchedulerEventArgs e)
        {
            string colorAttribute = e.Appointment.Attributes["AppointmentColor"];
            if (!string.IsNullOrEmpty(colorAttribute))
            {
                int colorValue;
                if (int.TryParse(colorAttribute, out colorValue))
                {
                    Color appointmentColor = Color.FromArgb(colorValue);
                    e.Appointment.BackColor = appointmentColor;
                    e.Appointment.BorderColor = Color.Black;
                    e.Appointment.BorderStyle = BorderStyle.Solid;
                    e.Appointment.BorderWidth = Unit.Pixel(1);
                }
            }
            e.Appointment.ToolTip = e.Appointment.Subject + ": " + e.Appointment.Description;
        }
    }

Any help is much appriciated.

Regards,

Corné
Peter
Telerik team
 answered on 23 Nov 2010
3 answers
163 views
Hi,
I wish that when I change the date with the integrated datepiker also change the date to a calendar outside the radscheduler.
The event is RadScheduler1_NavigationCommand from what I understand, but what is the name of the datepicker for reference?
Thanks a lot
Fabrizio
Peter
Telerik team
 answered on 23 Nov 2010
3 answers
75 views
What is the property of similar ActiveView in WinForms?

I would like to disable and Dayview TimeLineView
Nikolay Tsenkov
Telerik team
 answered on 23 Nov 2010
1 answer
75 views

I have a Telerik RAD Editor in a user control, so I can set defaults in one place to enable me to reuse the control where ever I need a rich text editor. When I add it to a page I want to validate the content property of the editor by using a RequiredFieldValidator control to ensure that the editor has content.

When I load the page I get,

"Control 'radEditor' referenced by the ControlToValidate property of 'ValidateEditor' cannot be validated."

After some research, I discovered decorating the class with [System.Web.UI.ValidationProperty("RadEditor")] will expose the validation property in the markup page, but when I add this attribute, the page doesn't throw the above error, but it is not respecting the RequiredFieldValidator hooked up to the control when I submit the page without content.

Any ideas?

Thanks,
Neil

Rumen
Telerik team
 answered on 23 Nov 2010
4 answers
278 views
Hi,

I created a RadGrid programmatically and added the RadGrid to a PlaceHolder control. The PlaceHolderControl is in a RadPageView.
In the code-behind, how can I programmatically find the RadGrid control when I click on a button?

I have tried the following code but to no avail.
 

 

 

protected void GetVotingsBtn_Click(object sender, EventArgs e)

 

{

 

 

  RadGrid vGrid = null;

 

 

 

 

  PlaceHolder GridPlaceHolder = (PlaceHolder)this.VotingRadPageView.FindControl("GridPlaceHolder");

 

 

 

  if (GridPlaceHolder != null) { vGrid = (RadGrid)this.GridPlaceHolder.FindControl("VRadGrid"); }

 

 

}

 


The value of the vGrid is always null. Please, help.

Thanks in advance.
Jeffrey
Top achievements
Rank 1
 answered on 23 Nov 2010
3 answers
32 views
Hi,

Clicking on the export button opens the document in the browser in IE 7.0. Can you provide a way for it to prompt a dialog box to save instead?

Thanks & Regards
Daniel
Telerik team
 answered on 23 Nov 2010
2 answers
763 views
I have a master page that defines a RadAjaxManager :

  <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" DefaultLoadingPanelID="RadAjaxLoadingPanel1">
  </telerik:RadAjaxManager>

and in my secondary page I have a button click handler that calls:

RadAjaxManager.GetCurrent(this.Page).Redirect("ManageGroups.aspx");

This fails with a null reference exception since GetCurrent returns null despite there being a RadAjaxManager on the master page. I've tried adding a RadAjaxManagerProxy to the secondary page but that doesn't seem to have any effect. So far the only way I've found to get round this issue is to create an extra RadAjaxManager on the secondary page which isn't very efficient.

This is in a project that was converted from .NET 3.5 to 4.0 just in case that helps point to the issue.
Paul
Top achievements
Rank 1
 answered on 23 Nov 2010
3 answers
66 views
hello,
i found that if my column had no space, it does not adhere to the width size and also does not wrap. any way around that? thanks.

Dimo
Telerik team
 answered on 23 Nov 2010
5 answers
134 views
Hi guys,

I want to create a custom skin for the RadEditor...

I have followed this article closely to copy Windows7 skin to my local project so I can rename it, and update files as necessary...
http://www.telerik.com/support/kb/aspnet-ajax/editor/register-external-skin-vista-radeditor.aspx

For the most part it works, but I am experiencing an issue with the Image Manager...

Please see attached JPG for issue with the Image Preview... I cannot access properties or insert the image as it's not picking up the correct styles. I copied the skin directly from my installation folder and have not changed anything.

Could you advise?

Thanks,
Chris.
Rumen
Telerik team
 answered on 23 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Bronze
Iron
Iron
yw
Top achievements
Rank 2
Iron
Iron
Stefan
Top achievements
Rank 2
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?