Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Tooltip and EnsureVisible two questions (Read 2922 times)
SimonL
YaBB Newbies
*
Offline



Posts: 36
Joined: Aug 11th, 2006
Tooltip and EnsureVisible two questions
Dec 14th, 2006 at 9:52am
Print Post  
Two questions guys

Question 1.

The e.Resource object is always nothing.

My app is all about hotel bookings so initially I load the calendar controls location collection with
details of each hotel room setting the id as the room number.

When I set the control to resource view all the rooms appear down the left hand side as required.
I noticed you were referring to resources so I filled the resources collection with
resource objects made up of the same data.

But whenever I hover over the resourceviewheader it always says the e.resource is nothing (I use VB.Net).

This is how I load locations/resources (BookingsView is the name of the calendar control)


       With BookingsView
           .Locations.Clear()
           .Resources.Clear()
           .Date = fromDate.Date
           .EndDate = toDate.Date
       End With

       Dim loc As MindFusion.Scheduling.Location
       Dim res As MindFusion.Scheduling.Resource

       ' Add the accommodations to the Y axis
       BookingsView.BeginInit()
       For Each Accomm In AccommList
           loc = New MindFusion.Scheduling.Location
           res = New MindFusion.Scheduling.Resource

           loc.Address = Accomm.Address

           loc.Id = Accomm.ID.ToString
           res.Id = Accomm.ID.ToString

               loc.Name = Trim(Accomm.Number) & " - " & Trim(Accomm.TypeDescription) & "/" & Trim(Accomm.StandardDescription) & "  [" & Accomm.NumGuests & "]"
               res.Name = loc.Name

           BookingsView.Locations.Add(loc)
           BookingsView.Resources.Add(res)
       Next

Am I doing something wrong ?


Question 2.


I'm trying to add a search routine to my app. Rooms (locations) down the y-axis, dates on the x-axis and bookings as the items.
The following routine is supposed to show a booking given an item.id

It does scroll the control to the date on the x-axis but not the y-axis so the item is not visible as I'd hoped.



    Private Sub HighlightItemInSchedule(ByVal ID As Integer)

       For Each item As MindFusion.Scheduling.Item In BookingsView.Schedule.Items
           If item.Id = ID Then
               BookingsView.ItemSelection.Clear()
               BookingsView.ItemSelection.Add(item)
               BookingsView.EnsureVisible(item.StartTime, item.Location)
               currentlySelectedItem = item
           End If
       Next

    End Sub

Can you help please?

Regards,
Simon




  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Tooltip and EnsureVisible two questions
Reply #1 - Dec 14th, 2006 at 10:23am
Print Post  
Both of these issues are caused by bugs in Planner.NET. I will send you a link through e-mail to the new version of the control as soon as the bugs are fixed.

Meppy
  
Back to top
 
IP Logged
 
SimonL
YaBB Newbies
*
Offline



Posts: 36
Joined: Aug 11th, 2006
Re: Tooltip and EnsureVisible two questions
Reply #2 - Dec 20th, 2006 at 11:20am
Print Post  
Meppy,

Thanks for this release both things appear to be fixed.

However (there's always an however isn't there  Smiley ). If the number of resources is not sufficient to fill the calendar control vertically then whenever I add a new item by clicking and dragging - it seems ok but when the ensurevisible is called I get an exception.

It says that the value (-15) is invalid and must be betwen the minimum and maximum. Is this a gug or am I doing something wrong.

Regards,
Simon
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: Tooltip and EnsureVisible two questions
Reply #3 - Dec 20th, 2006 at 12:53pm
Print Post  
Hey Simon,

This appears to be a bug on our part. I will contact you through e-mail with a fixed version of the control.

Meppy

P.S.: Lets hope there will be no more 'howevers' this time. Smiley
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint