Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Setting first displayed date (Read 1883 times)
elpuerco
Junior Member
**
Offline


Time?  What's time matta
to a pig?

Posts: 94
Joined: Oct 2nd, 2007
Setting first displayed date
Oct 10th, 2007 at 2:11pm
Print Post  
Is it possible to reset the displayed calendar date to the current day following a reload of data?

I open the app and the first date is today

I scroll a couple of weeks and add an appointment

I then click my reload button to restore the calendar

The calendar is successfully restored but the focus is still on the last date I selected prior to reload?

Here is my reload code:

Code
Select All
 Private Sub btnRefresh_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnRefresh.Click

	  Me.calTimeTableView.Schedule.Clear()

	  Me.calTimeTableView.Date = Today

	  Me.GRSDataSet.Clear()

	  Me.ItemTableAdapter1.Fill(Me.GRSDataSet.Item)

	  Me.calTimeTableView.LoadFromDataSource()

End Sub
 



I also tried to invalidate the calendar but that makes no difference either?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Setting first displayed date
Reply #1 - Oct 11th, 2007 at 4:40am
Print Post  
If you are using the Timetable view, you have to specify the displayed dates through the TimetableSettings.Dates collection. Consider the following sample:

Code
Select All
Me.calTimeTableView.TimetableSettings.Dates.Clear()
Me.calTimeTableView.TimetableSettings.Dates.Add(Today) 


Meppy
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint