Hi,
I don't know whether is it my mistake or bug in the Gantt control.
Description:
I try to implement buttons that change time period displayed in Gantt. To do this, in my view I have:
I don't know whether is it my mistake or bug in the Gantt control.
Description:
I try to implement buttons that change time period displayed in Gantt. To do this, in my view I have:
<telerik:RadGanttView x:Name="gantMain" TasksSource="{Binding Activities}" SelectedItem="{Binding SelectedItem, Mode=TwoWay}" VisibleRange="{Binding GanttRange, Mode=OneWay}">This is no surprise, as it's described in Gantt guide. Additionally, button is declared like this:
<customTelerikControls:ToolBarButton x:Name="btnVisibilityCurrentMonth"cal:Message.Attach="Visibility_CurrentMonth" Text="Current Month" /> Code in viewmodel:private IDateRange _GanttRange; public IDateRange GanttRange { get { return _GanttRange; } set { if (_GanttRange != value) { _GanttRange = value; NotifyOfPropertyChange(() => GanttRange); } } }public void Visibility_CurrentMonth() { DateTime now = DateTime.Now; DateTime start = new DateTime(now.Year, now.Month, 1); DateTime end = new DateTime(now.Year, now.Month, DateTime.DaysInMonth(now.Year, now.Month)); GanttRange = new VisibleRange(start, end.AddDays(1)); //TODO: why do I need to add one day???????? }Question is: why do I need to add one day in visible range ctor to display full month? If I don't add this one day, September will be displayed from 1st to 29th. Best regards Paweł