Fixed top row?

4 posts, 0 answers
  1. Mark
    Mark avatar
    94 posts
    Member since:
    Jul 2014

    Posted 17 Feb 2017 Link to this post

    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.

  2. Misho
    Admin
    Misho avatar
    195 posts

    Posted 21 Feb 2017 Link to this post

    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.
  3. Till
    Till avatar
    1 posts
    Member since:
    Jun 2016

    Posted 23 Jun 2017 Link to this post

    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

  4. Ivan Danchev
    Admin
    Ivan Danchev avatar
    1728 posts

    Posted 26 Jun 2017 Link to this post

    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.
Back to Top