This is a migrated thread and some comments may be shown as answers.

Fixed top row?

3 Answers 34 Views
Scheduler
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 17 Feb 2017, 05:14 PM

Hello,

I'm using the scheduler in timeline month view (albeit with a custom view to just show 7 days) and I want to freeze the top row.

Here is my grid:

@(Html.Kendo().Scheduler<TEAMSV2.Models.WeekViewSchedulerDTO>()
    .Name(Section + TabName + SubTabName)
    .Date(new DateTime(ChosenDate.Year, ChosenDate.Month, ChosenDate.Day))
    .StartTime(new DateTime(ChosenDate.Year, ChosenDate.Month, ChosenDate.Day, 00, 00, 00))
    .EndTime(new DateTime(ChosenDate.Year, ChosenDate.Month, ChosenDate.Day, 23, 59, 59))
    .Timezone("Etc/UTC")
    .MajorTick(1440)
    .Height(500)
    .Views(v =>
    {
        v.CustomView("MyCustomTimelistView");
    })
    .Group(group => group.Resources("Employees").Orientation(SchedulerGroupOrientation.Vertical))
    .Resources(r =>
    {
        r.Add(m => m.Employees)
            .Title("Employees")
            .Name("Employees")
            .Multiple(true)
            .DataTextField("Text")
            .DataValueField("Value")
            //.DataColorField("Color")
            .DataSource(d => d
                .Read(rd =>
                {
                    rd.Action("GetWeekViewResources", "TeamsV2").Type(HttpVerbs.Post);
                })
            );
    })
    .DataSource(d => d
        .Model(m =>
        {
            m.Id(f => f.EventId);
            m.Field(f => f.Title).DefaultValue("No title");
        })
        .Read("GetWeekViewSchedulerData", "TeamsV2")
    )
    .Events(e => e
        .DataBinding(Section + TabName + SubTabName + "SchedulerDatabinding")
        .DataBound(Section + TabName + SubTabName + "SchedulerDatabound")
    )
)

 

And here is the custom view:

<script>
    var MyCustomTimelistView = kendo.ui.TimelineMonthView.extend({
        options: {
            name: "MyCustomTimelistView",
            title: "Timeline Month",
            selectedDateFormat: "{0:D} - {1:D}",
            selectedShortDateFormat: "{0:d} - {1:d}",
            majorTick: 720,
            numberOfDays: 7,
            dateHeaderTemplate: "<div class='k-link k-nav-day'>#=kendo.toString(date, 'ddd dd MMM yyyy')#</div>"
        },
        name: "MyCustomTimelistView",
        calculateDateRange: function () {
            //create the required number of days
 
            var start = this.options.date,
                //  start = kendo.date.dayOfWeek(selectedDate, this.calendarInfo().firstDay, -1),
                idx, length,
                dates = [];
 
            for (idx = 0, length = this.options.numberOfDays; idx < length; idx++) {
                dates.push(start);
                start = kendo.date.nextDay(start);
            }
            this._render(dates);
        },
        previousDate: function () {
            var date = new Date(this.startDate());
 
            date.setDate(date.getDate() - this.options.numberOfDays);
 
            return date
        }
    });
</script>

 

The "Resources" for this scheduler are a list of employees but the top one is hard-coded as "Unassigned" for when an event is not assigned to an employee.  I need this row of unassigned events to always be visible when the rest of the employees are scrolled (as the scheduler is set to 500px).

Any ideas?

Thanks,

Mark.

3 Answers, 1 is accepted

Sort by
0
Misho
Telerik team
answered on 21 Feb 2017, 11:35 AM
Hello,

This scenario is not supported. You can examine our online demos and documentation which showcase the available options for Scheduler views. You may also find the the collection of Telerik UI for ASP.NET MVC sample projects useful.

Best Regards,
Misho
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
0
Till
Top achievements
Rank 1
answered on 23 Jun 2017, 05:04 AM

Hello,

 

@Mark Did you found a solution? Currently I have this problem too.

 

@Misho Is this function to be expected in the near future?

 

Best Regards

Till

0
Ivan Danchev
Telerik team
answered on 26 Jun 2017, 01:58 PM
Hello Till,

There are no immediate plans to implement this functionality, so we would suggest logging it as a feature request in our public Feedback Portal and vote for it. The team reviews the logged requests and many of the highly demanded ones get implemented in subsequent releases. 

Regards,
Ivan Danchev
Progress Telerik
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
Scheduler
Asked by
Mark
Top achievements
Rank 1
Answers by
Misho
Telerik team
Till
Top achievements
Rank 1
Ivan Danchev
Telerik team
Share this question
or