ComponentGO! :: Forum

user:
psw:
| lost password
home recent posts search register AspNetForum v.3.0.0.0

Home » Recent messages recent posts - RSS

2/3/2012 11:42:09 AM
topic: Erro when the ItemSource is modified

from: joao
Posts 6
Hi,

I use the scheduler with the ItemsSource bound to a property in a viewmodel. That property is a List<PlanningItem>
Everithing runs perfectly except when i try to collapse a parent row after i've changed the property which is bound to the itemsSource.

performing the following steps:

1) I click on the horizontal scroll bar of the scheduler and it is scrolled to the left and the event "scheduler1_DataRequest" is fired.
2) in "scheduler1_DataRequest" event I Change the itemsSource to a new List<PlanningItem>.
3) The planning is automaticaly updated and the new items are displayed correctly.
4) I Click in a resource row which has childrens to collapse them all and to display the summarize item in the parent this row.
5) the following error occurs:

{System.NullReferenceException: Object reference not set to an instance of an object.
em ComponentGo.Windows.Schedulers.ResourceRow.addSumItem(List`1 sitems, SchedulerItem it)
em ComponentGo.Windows.Schedulers.ResourceRow.calcSums(List`1 sitems, ResourceRow row, Boolean withDep)
em ComponentGo.Windows.Schedulers.ResourceRow.RecalcSums()
em ComponentGo.Windows.Schedulers.SchedulerItemCollection.OnLoading(SchedulerItem item, Object source, Boolean newItem)
em ComponentGo.Windows.BindableCollection`1.LoadList(IEnumerable list)
em ComponentGo.Windows.BindableCollection`1.BindAdding(IEnumerable list)
em ComponentGo.Windows.BindableCollection`1.set_DataSource(IEnumerable value)
em ComponentGo.Windows.Schedulers.Scheduler.<.cctor>b__19(Scheduler sch, IEnumerable oldV, IEnumerable newV)
em ComponentGo.Windows.Utils.<>c__DisplayClassa`2.<Register>b__9(DependencyObject obj, DependencyPropertyChangedEventArgs e)
em System.Windows.DependencyObject.RaisePropertyChangeNotifications(DependencyProperty dp, Object oldValue, Object newValue)
em System.Windows.DependencyObject.UpdateEffectiveValue(DependencyProperty property, EffectiveValueEntry oldEntry, EffectiveValueEntry& newEntry, ValueOperation operation)
em System.Windows.DependencyObject.RefreshExpression(DependencyProperty dp)
em System.Windows.Data.BindingExpression.SendDataToTarget()
em System.Windows.Data.BindingExpression.SourcePropertyChanged(PropertyPathListener sender, PropertyPathChangedEventArgs args)
em System.Windows.PropertyPathListener.RaisePropertyPathStepChanged(PropertyPathStep source)
em System.Windows.PropertyAccessPathStep.RaisePropertyPathStepChanged(PropertyListener source)
em System.Windows.CLRPropertyListener.SourcePropertyChanged(Object sender, PropertyChangedEventArgs args)
em System.Windows.Data.WeakPropertyChangedListener.PropertyChangedCallback(Object sender, PropertyChangedEventArgs args)
em System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
em Eticadata.ViewModelBase.NotifyChanged(String propertyName)}

Whaaaaa?




private void DoSchedulerDataRequestCommand(SchedulerDataRequestEventArgs e)
{



List<PlanningItem> pi=new List<PlanningItem> ();
pi.add(item1);
pi.add(item2);

PlanningItems.Where(p => p.id>1) ToList().ForEach(i => PlanningItems.Remove(i));

PlanningItems =pi;


}


//extract from my xaml

<Scheduler

ItemsSource= "{Binding PlanningItems}"
/>




Is there any idea why this error is fired?
thanks in advance.


best regards,
João Salgado
2/2/2012 4:39:37 PM
topic: Silverlight 5

from: MachAMS
Posts 18
Hello,

The scheduler installer includes the System.Windows.Controls dll version 2.0.5.0

After we upgraded our projects to SL5, we started to have some conflicts with this dll, and replaced it with the corresponding version 5

What is the impact ?

Thanks
1/31/2012 8:27:35 AM
topic: Vertical Scrollbar Problem

from: go
Posts 1305
We have corrected the problem. You can check it with the recent 2.0.10 build:

http://www.componentgo.com/downloads/SilverDemoBeta.exe
1/31/2012 8:10:42 AM
topic: Clicking SchedulerItem after loading application throws enum exeption

from: go
Posts 1305
Unfortunately, I cannot reproduce the problem. It have to depend on another settings. Could you give me more information, or test application which reproduce the exception?
1/31/2012 8:02:14 AM
topic: Finding current date

from: go
Posts 1305
Try to use SelectedDateBegin and SelectedDateEnd properties.
1/31/2012 7:58:40 AM
topic: how to correctly clear the component ?

from: go
Posts 1305
We have tried to add SchedulerItem and ResourceRow directly into scheduler. Unfortunately, we are still not to able to reproduce problem.
We have tired with following code:

void init() {
ResourceColumn col = new ResourceColumn {
Caption="Res",
ToolTipMember="ToolTip"
};
scheduler1.Columns.Add(col);

for (int i = 100; --i>=0; ) {
var row = new ResourceRow();
scheduler1.Rows.Add(row);
row[col].EditValue = i+" number";

var it = new SchedulerItem();
it.Start = DateTime.Today.AddHours(6);
it.End = DateTime.Today.AddHours(20);
it.Text = "Item A";
row.Items.Add(it);

it = new SchedulerItem();
it.Start = DateTime.Today.AddHours(30);
it.End = DateTime.Today.AddHours(40);
it.Text = "Item B";
row.Items.Add(it);
}
}

Could you send me your code, please? How exactly you initialize scheduler?
1/31/2012 5:39:31 AM
topic: ArgumentException Error

from: go
Posts 1305
Which version of scheduler are you using? The problem was corrected in the recent beta build.
edited by go on 1/31/2012
1/30/2012 7:30:23 AM
topic: Clicking SchedulerItem after loading application throws enum exeption

from: mbaeuml
Posts 1
Normally, clicking an scheduler item that has a start- and enddate outside the visible timerange of the scheduler, results in a change of the time resolution so that the item can be seen completely. But if click on such an item right after loading the application the component throws an exception:

Unhandled Error in Silverlight Application
Code: 4004
Category: ManagedRuntimeError
Message: System.InvalidOperationException: [InvalidOperation_EnumFailedVersion]

StackTrace:
at System.ThrowHelper.ThrowInvalidOperationException(ExceptionResource resource)
at System.Collections.Generic.List`1.Enumerator.MoveNextRare()
at System.Collections.Generic.List`1.Enumerator.MoveNext()
at ComponentGo.Windows.Schedulers.TimeRulersPresenter.MeasureOverride(Size availableSize)
at System.Windows.FrameworkElement.MeasureOverride(IntPtr nativeTarget, Single inWidth, Single inHeight, Single& outWidth, Single& outHeight)



If I wait about 10 seconds after loading the application the exception does not occur.
The error occurs in the 2.0.2 version of silverlight scheduler as well es in the 2.0.9 beta version. How can I prevent this?

Thanks in advance.
Matthias
1/30/2012 6:32:51 AM
topic: Finding current date

from: mmartin
Posts 1
How can i find the current highlighted date that the user has selected? I can get it if the user clicks on it but what if the user uses the arrow keys to scroll to it?
1/25/2012 8:24:04 AM
topic: how to correctly clear the component ?

from: patfac1
Posts 6
hello,

I've tryed too ... but you don't have this prblem on your demo ...

Maybe I forget something when clearing ?

I add items on the scheduler by code

SchedulerItem it1 = new SchedulerItem();
it1.Key = pNewTask.Id_Task;
it1.Start = ...
pages: 1 2 3