Telerik Forums
UI for WinForms Forum
1 answer
7 views

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="AimmsApp.Task.Views.AgendaMenu"
             xmlns:resx="using:AimmsApp.Resources"
             xmlns:input="clr-namespace:Telerik.XamarinForms.Input;assembly=Telerik.XamarinForms.Input"
             xmlns:views="clr-namespace:AimmsApp.Task.Views;assembly=AimmsApp"
             Title="{x:Static resx:Resources.Agenda}">
    <AbsoluteLayout x:Name="mainLayout">
        <input:RadCalendar x:Name="calendar" ViewMode="Agenda" AppointmentsSource="{Binding Appointments}">

            <input:RadCalendar.AgendaViewSettings>
                <input:AgendaViewSettings MonthItemFormat="YYYY MMM"
                                          WeekItemStartDateFormat="dd MMMM"
                                          WeekItemEndDateFormat="dd"
                                          DayItemFormat="EEE d MMM"
                                          AppointmentItemTimeFormat="HH mm"
                                          AppointmentItemEndDateFormat="MMM d"
                                          AppointmentItemStartDateFormat="MMM d" 
                                          IsHeaderSticky="True" 
                />
            </input:RadCalendar.AgendaViewSettings>
            <input:RadCalendar.BindingContext>
                <views:CalendarView />
            </input:RadCalendar.BindingContext>

        </input:RadCalendar>
    </AbsoluteLayout>
</ContentPage>

 

I tried with scheduler but there is no agenda view maybe somehow with dayview and remove the hours?

Nadya | Tech Support Engineer
Telerik team
 answered on 11 Mar 2024
0 answers
10 views

I am using the radScheduler for the first time.  I am trying to bind some data to it (or even add events programmatically) that we are receiving from an RRS feed.   Is there a simple way to do this.  The Help files are more about binging a table/dataset to it.  Note, this control is used as a READ only view of events for my customers. 

 

TIA for the help

 

 

Mark
Top achievements
Rank 2
Iron
Iron
Veteran
 asked on 05 Mar 2024
1 answer
12 views
Would it be possible to update the schduler ruler current time marker every 15 minutes. Can I have a timimg loop to refresh the update time.
Nadya | Tech Support Engineer
Telerik team
 answered on 20 Feb 2024
1 answer
12 views

Hello,

I am trying to drag an item from a form Gridview to a Scheduler control but could not see any Scheduler Dragover event got fired. I have set the Scheduler AllowDrop property to true and my code to initiate the transfer is gridview1.DoDragDrop(sTDF, DragDropEffects.Move). Help is apprevciated.

Thanks

Peter

Nadya | Tech Support Engineer
Telerik team
 answered on 07 Feb 2024
6 answers
56 views

Hello,

I have implemented a custom AppointmentElement and I habe a small display problem with it.

Here is a screenshot: Screenshot

When the area of the appointment gets to small,  the arrow on the right is no longer drawn, but i want the element to always draw it and cut the text first.

Here is my implementation:


internal class CustomAppointmentElement : AppointmentElement
{
    private AppointmentsViewModel _appointmentsViewModel;
    private DockLayoutPanel _outerContainer;
    private StackLayoutElement _container;
    private LightVisualButtonElement _expandCollapseButton;
    private LightVisualElement _icon1;
    private LightVisualElement _icon2;
    private LightVisualElement _icon3;
    private LightVisualElement _timeText;
    private LightVisualElement _summaryText;
    private LightVisualElement _continueArrow;

    protected override void CreateChildElements()
    {
        base.CreateChildElements();
        this.Padding = new Padding(1, 0, 1, 0);

        _outerContainer = new DockLayoutPanel();
        _outerContainer.StretchHorizontally = true;
        _outerContainer.StretchVertically = true;
        _outerContainer.ShouldHandleMouseInput = false;
        _outerContainer.NotifyParentOnMouseInput = true;
        _outerContainer.LastChildFill = true;

        _continueArrow = new LightVisualElement();
        _continueArrow.Image = ArrowRightImage;
        _continueArrow.StretchHorizontally = false;

        _container = new StackLayoutElement();
        _container.Orientation = Orientation.Horizontal;
        _container.Alignment = ContentAlignment.MiddleLeft;
        _container.StretchHorizontally = false;
        _container.StretchVertically = true;
        _container.ShouldHandleMouseInput = false;
        _container.NotifyParentOnMouseInput = true;

        _expandCollapseButton = new LightVisualButtonElement();
        _expandCollapseButton.ShouldHandleMouseInput = true;
        _expandCollapseButton.Margin = new Padding(1, 1, 0, 1);
        _expandCollapseButton.NotifyParentOnMouseInput = false;
        _expandCollapseButton.Alignment = ContentAlignment.MiddleLeft;
        _expandCollapseButton.StretchHorizontally = false;
        _expandCollapseButton.StretchVertically = false;
        _expandCollapseButton.Click += _expandCollapseButton_Click;
        _expandCollapseButton.Image = GetButtonImage(false);

        _icon1 = new LightVisualElement();
        _icon1.ShouldHandleMouseInput = false;
        _icon1.Margin = new Padding(1, 1, 0, 1);
        _icon1.NotifyParentOnMouseInput = true;
        _icon1.Alignment = ContentAlignment.MiddleLeft;
        _icon1.StretchHorizontally = false;
        _icon1.StretchVertically = false;

        _icon2 = new LightVisualElement();
        _icon2.ShouldHandleMouseInput = false;
        _icon2.NotifyParentOnMouseInput = true;
        _icon2.Alignment = ContentAlignment.MiddleLeft;
        _icon2.StretchHorizontally = false;
        _icon2.StretchVertically = false;
        _icon2.Margin = new Padding(2, 1, 0, 1);

        _icon3 = new LightVisualElement();
        _icon3.ShouldHandleMouseInput = false;
        _icon3.NotifyParentOnMouseInput = true;
        _icon3.Alignment = ContentAlignment.MiddleLeft;
        _icon3.StretchHorizontally = false;
        _icon3.StretchVertically = false;
        _icon3.Margin = new Padding(2, 1, 0, 1);

        _timeText = new LightVisualElement();
        _timeText.Alignment = ContentAlignment.MiddleLeft;
        _timeText.ShouldHandleMouseInput = false;
        _timeText.NotifyParentOnMouseInput = true;
        _timeText.StretchHorizontally = false;
        _timeText.StretchVertically = false;
        _timeText.Margin = new Padding(2, 1, 2, 1);
        _timeText.ClipText = true;
        _timeText.TextWrap = false;
        _timeText.AutoEllipsis = true;

        _summaryText = new LightVisualElement();
        _summaryText.Alignment = ContentAlignment.MiddleLeft;
        _summaryText.ShouldHandleMouseInput = false;
        _summaryText.NotifyParentOnMouseInput = true;
        _summaryText.StretchHorizontally = false;
        _summaryText.StretchVertically = false;
        _summaryText.Margin = new Padding(2, 1, 2, 1);
        _summaryText.ClipText = true;
        _summaryText.TextWrap = false;
        _summaryText.AutoEllipsis = true;
        _summaryText.Font = new Font(_summaryText.Font, FontStyle.Bold);

        _container.Children.Add(_expandCollapseButton);
        _container.Children.Add(_icon1);
        _container.Children.Add(_icon2);
        _container.Children.Add(_icon3);
        _container.Children.Add(_timeText);
        _container.Children.Add(_summaryText);

        DockLayoutPanel.SetDock(_container, Telerik.WinControls.Layouts.Dock.Left);
        _outerContainer.Children.Add(_continueArrow);
        DockLayoutPanel.SetDock(_continueArrow, Telerik.WinControls.Layouts.Dock.Right);
        _outerContainer.Children.Add(_container);

        Children.Add(_outerContainer);
    }
}

Hope you could help me solve it.

 

Regards,

Stephan

Stephan
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 16 Jan 2024
2 answers
19 views

Hello,

I am using RadScheduler with a grouped TimelineView. The number of resources can be selected with a TrackBar, but if the selected value is to high, the view looks squezed and I got overlappings in my customized resource header elements. So my Idea is a minimum ResourceHeaderHeigth. I want to achieve this by calculating the maximum suitable ResourcesPerView value when the Trackbar is changed or the Form / Scheduler is resized. E.g. if my Scheduler has 250 px size, max 5 resources should be visible and if the size is resized to 200 px, only 4 should be shown, so that every resource has at least 50px height.

But to achieve this I need to get the size of the area, where the resources are paintet or SchedulerSize minus Header and Footer.

        private void tbVisibleResourceCount_ValueChanged(object sender, EventArgs e)
        {
            if (DesignMode)
                return;

            try
            {
                int val = (int) tbVisibleResourceCount.Value;

                if (val <= 0)
                {
                    tbVisibleResourceCount.Value = 1;
                }
                else
                {
                    var newValue = Math.Min(val, AppointmentsVm?.AktiveRessourcen?.Count ?? 0 /*rsTermine.Resources.Count*/);

                    /* todo
                    switch (rsTermine.SchedulerElement.ViewElement)
                    {
                        case SchedulerTimelineViewElement timelineElement:                           
                            break;
                    
                        case SchedulerDayViewElement dayViewElement:
                            break;

                        case SchedulerMonthViewElement monthViewElement:
                            break;

                        case TimelineGroupingByResourcesElement timelineGrouped:
                            IList<SchedulerTimelineViewElement> childTimelineElements = timelineGrouped.GetChildViewElements();
                            break;

                        case SchedulerDayViewGroupedByResourceElement dayViewGrouped:
                            break;

                        case SchedulerMonthViewGroupedByResourceElement monthViewGrouped:
                            break; 
                    }*/

                    rsTermine.ActiveView.ResourcesPerView = newValue;
                }

                SetAppointmentsMargin();
                _adjustBackgroundsTimer?.Reset();
            }
            catch (Exception ex)
            {
                LogHelper.HandleError<CalendarView>(this, $"Fehler in {nameof(tbVisibleResourceCount_ValueChanged)}", ex);
            }
        }

 

Hope you can help me with this problem.

 

Regards,

Stephan

Stephan
Top achievements
Rank 3
Bronze
Iron
Iron
 answered on 19 Dec 2023
1 answer
30 views

Hey there!

I wanted to ask if there's a way to change the resource height to a fixed value... When i have a low amount of resources it works fine

But when I have a high amount of resources, the object becomes unusable:

I need to be able to define a fixed size for each resource, and if I do that with code I'm using in the first resource  ('SetResourceSize') then every single one of them will have the same small height (accordingly with the monitor of the user).

Is there a way to do that? Maybe by forcing a vertical scroll (something that i tried but didn't managed to do it)?

Dinko | Tech Support Engineer
Telerik team
 answered on 10 Oct 2023
1 answer
28 views

Hi! 

In my code I'm creating new appointments in a scheduler by dropping them from a radGridView. Any ideas how can I get the last created appointment element of the scheduler, or the appointment element assigned to the newly created appointment?

private void svc_PreviewDragDrop(object sender, RadDropEventArgs e)
        {
            SchedulerCellElement schedulerCell = e.HitTarget as SchedulerCellElement;

            if (schedulerCell != null)
            {
                GridDataRowElement draggedRow = e.DragInstance as GridDataRowElement;
                if (draggedRow != null)
                {
                    if (draggedRow.Data.DataBoundItem != null)
                    {
                        if (draggedRow.GridControl.DataSource != null)
                        {
                            MainJobObject draggedMainJobObject = (MainJobObject)draggedRow.Data.DataBoundItem;
                            AppointmentWithObject appointment = new AppointmentWithObject(schedulerCell.Date, schedulerCell.Date.AddHours(1), draggedMainJobObject.Customer, " / ", draggedMainJobObject.MachineType);
                            appointment.Start = schedulerCell.Date;
                            appointment.End = schedulerCell.Date.AddHours(1);
                            appointment.AssignedMainJobObject = draggedMainJobObject;
                            appointment.ResourceId = schedulerCell.View.GetResourceId();
                            scheduler.Appointments.Add(appointment);

                            //CustomAppointmentElement appointmentElement = get the appointment element that was just created;
                            //if (appointmentElement != null)
                            //{
                            //    appointmentElement.ChangeStatus(2);
                            //}                         
                        }
                    }
                }            
            }          
        }


Nadya | Tech Support Engineer
Telerik team
 answered on 02 Oct 2023
1 answer
31 views

Hi!

How does one programmatically scroll through the resources (vertical scroll) in a timeline view scheduler that is grouped by resources?

Thanks!

Nadya | Tech Support Engineer
Telerik team
 answered on 29 Sep 2023
2 answers
30 views

Hello, I am using a scheduler, where my appointments can have multiple resources. A resource can be the a casual member or be responsible for the appointment. I want to achieve a custom formatting of the appointment element, depending on the following states:

- the current resource is the only member (automatically responsible)
- the current resource is member, but not responsible
- the current resource is responsible and appointment has other members.

The attached screenshot shows a single appointment with 2 members and a responsible. The drawn Icon shall be depending on the resource of the current row.

To achieve that task, I want to implement the AppointmentFormatting-Event and set the Icon of the AppointmentElement depending on the relative resouce state. But how do I determine the current resouce of the AppointmentElement?

Regards Stephan

 

Nadya | Tech Support Engineer
Telerik team
 answered on 28 Sep 2023
Narrow your results
Selected tags
Tags
GridView
General Discussions
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
Buttons, RadioButton, CheckBox, etc
DropDownList
ComboBox and ListBox (obsolete as of Q2 2010)
ListView
Chart (obsolete as of Q1 2013)
Form
PageView
MultiColumn ComboBox
TextBox
Menu
RichTextEditor
PropertyGrid
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
Tabstrip (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
GanttView
New Product Suggestions
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
VirtualGrid
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
Documentation
SplitContainer
Map
DesktopAlert
ProgressBar
Rotator
TrackBar
MessageBox
CheckedDropDownList
SpinEditor
StatusStrip
CheckedListBox
Wizard
ShapedForm
SyntaxEditor
TextBoxControl
LayoutControl
CollapsiblePanel
Conversational UI, Chat
DateTimePicker
CAB Enabling Kit
TabbedForm
DataEntry
GroupBox
ScrollablePanel
WaitingBar
ImageEditor
ScrollBar
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
ColorDialog
FileDialogs
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
BindingNavigator
PopupEditor
RibbonForm
TaskBoard
Barcode
Styling
ColorBox
PictureBox
Callout
VirtualKeyboard
FilterView
Accessibility
DataLayout
NavigationView
ToastNotificationManager
CalculatorDropDown
Localization
TimePicker
ValidationProvider
FontDropDownList
Licensing
BreadCrumb
ButtonTextBox
LocalizationProvider
Dictionary
Overlay
Security
Separator
SparkLine
TreeMap
StepProgressBar
SplashScreen
ToolbarForm
NotifyIcon
Rating
TimeSpanPicker
BarcodeView
Calculator
OfficeNavigationBar
Flyout
TaskbarButton
HeatMap
SlideView
PipsPager
+? more
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
horváth
Top achievements
Rank 2
Iron
Iron
Steve
Top achievements
Rank 2
Iron
Erkki
Top achievements
Rank 1
Iron
Mark
Top achievements
Rank 2
Iron
Iron
Veteran
Jakub
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?