Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic EnableVirtualItemSpace crashes (Read 8379 times)
SLUser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: Dec 7th, 2012
EnableVirtualItemSpace crashes
Dec 21st, 2012 at 10:52am
Print Post  
It would like to have a scroll bar when not all the items can be shown in listview.
However setting the property cal.ListViewSettings.EnableVirtualItemSpace = true throws an exception.
Unhandled exception code: 4004
Argument out of range exception: Index was out of range, must be non-negative and less than the size of the collection.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: EnableVirtualItemSpace crashes
Reply #1 - Jan 2nd, 2013 at 10:08am
Print Post  
Hi again,

You can download a new version of the control from the link below:

https://mindfusion.eu/_temp/MindFusion.Scheduling.Silverlight.trial.zip

This version should fix the crash when setting EnableVirtualItemSpace as well as the problem with programmatic selection changes and the remaining items during navigation in List and MonthRange views.

Regards,
Meppy
  
Back to top
 
IP Logged
 
SLUser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: Dec 7th, 2012
Re: EnableVirtualItemSpace crashes
Reply #2 - Jan 9th, 2013 at 8:00pm
Print Post  
Thanks, the bugs appear to be fixed.
However I still do not get any scroll bar in listview when too many items are present.
And also in SingleMonth view, if more than 4 items are set in 1 day, is there a way to scroll down to the invisble items ?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: EnableVirtualItemSpace crashes
Reply #3 - Jan 11th, 2013 at 5:22pm
Print Post  
Hi,

We are currently working on a fix. I will get back to you soon.

Regards,
Meppy
  
Back to top
 
IP Logged
 
SLUser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: Dec 7th, 2012
Re: EnableVirtualItemSpace crashes
Reply #4 - Jan 12th, 2013 at 7:51pm
Print Post  
Actually, for me it would be preferable if a certain row would (auto)enlarge if more items are present. Is there currently a way to implement this ?
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: EnableVirtualItemSpace crashes
Reply #5 - Jan 14th, 2013 at 6:54am
Print Post  
What do you mean by auto enlarge? Can you give more specifics?
  
Back to top
 
IP Logged
 
SLUser
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 34
Joined: Dec 7th, 2012
Re: EnableVirtualItemSpace crashes
Reply #6 - Jan 14th, 2013 at 10:55pm
Print Post  
If there are more items in a day than can be shown, that the row (only for that week) would become higher so that all the items are always visible.
  
Back to top
 
IP Logged
 
Meppy
God Member
*****
Offline


MindFusion support

Posts: 1783
Joined: Jul 20th, 2005
Re: EnableVirtualItemSpace crashes
Reply #7 - Jan 17th, 2013 at 9:14am
Print Post  
Hi,

An updated version of the control that fixes the scrollbar issue in the List view can be downloaded from the following link:

https://mindfusion.eu/_temp/MindFusion.Scheduling.Silverlight.trial2.zip

Regarding the row auto-enlarge option in SingleMonth this is not something that can be implemented easily. However, you can use the following solution in order to allow users to interactively scroll through the items in a SingleMonth cell.

1. Make sure that the hidden item icon is displayed when there are invisible items, by setting Calendar.ItemSettings.ShowMoreItemsCue to true.

2. Assign different priorities to items. For example, you can handle the ItemCreated event and set the priority of the newly created item to the number of items.

3. Handle the Calendar.HiddenItemClick event (raised when the user clicks on the hidden item icon). In the event handler obtain all items in the respective cell and increase the priority of the lowest priority item so that it is displayed at the top:

Code
Select All
var items = calendar.Schedule.GetAllItems(e.Date, e.Date.AddTicks(TimeSpan.TicksPerDay - 1));

Item i = null;
int maxPrio = 0;
int minPrio = int.MaxValue;
foreach (Item item in items)
{
	if (item.Priority < minPrio)
	{
		i = item;
		minPrio = item.Priority;
	}
	maxPrio = Math.Max(maxPrio, item.Priority);
}

i.Priority = maxPrio + 1; 


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