dataGrid cell animation + dataobject update doesn't work at same time

Please report bugs here. If you are unsure whether something is a bug or an expected behavior, please post it on the "Technical Support" forum instead, and wait for a moderator to handle/move the post.
Sesztak
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

dataGrid cell animation + dataobject update doesn't work at same time

Postby Sesztak » Tue Sep 20, 2016 8:13 am

Dear JS-Support,

We have a problem: if we try to do dataGrid cell animation + dataobject update: both doesn't work at same time !
(We would like to highlight the modified row to the user: this is the background of this use case: server fetch new data => client side: UI animation + data update, see attached picture: the red parts modified by 3rd party user and broadcasted to this client)

Background info:
e.g. on XAML side:
-we have a simple double animation
-pluss a datagrid with custom DataTemplate-ed DataGridTemplateColumn.CellTemplate (e.g. we have a TextBlock what we want to animate)

on C# code behind:
- when we receive a Server event (by WebSocket to modify some existing data : datagrid itemSource object): we do two things:
1./ modify the itemSource object,
like:
_SomeSampleData[2].Name = "New Data from Server, Success !";

2., play the animation (Storyboard.SetTarget on TextBlock in dataGrid, and play animation with .Begin() )

Bug description:

If we omit one line : , like : // _SomeSampleData[2].Name = "New Data from Server, Success !";
the animation works nicely as expected.

if put it back : _SomeSampleData[2].Name = "New Data from Server, Success !";
no animation occurs.

Would you be so kind to check this bug at your side ?
Can you reproduce the bug?

Seems like: modification of any property of dataobject kill the animation.

Thanks in advance,
Best Regards,
Péter
Attachments
CSHTML5animationAndDataUpdateBug.JPG
CSHTML5animationAndDataUpdateBug.JPG (50.38 KiB) Viewed 5182 times

Sesztak
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

Re: dataGrid cell animation + dataobject update doesn't work at same time

Postby Sesztak » Tue Sep 20, 2016 10:24 am

Dear JS-Support,
the problem seems like to be independent of the animation -but still exist:

at Chrome debugger we got exception:

function Tranzakcio_set_DataVersion (value) {
var flag = !(this.DataVersionField)['Equals'](value);
if (flag) {
this.DataVersionField = value;
this['RaisePropertyChanged']("DataVersion");
}
};

Exception:
'TypeError: this DataVersionField.Equals is not a function'.
CSHTML5_longTypeError.JPG
CSHTML5_longTypeError.JPG (11.48 KiB) Viewed 5178 times


The DataVersion is a long type at C# server code:
private long dataVersion;
[DataMember]
public long DataVersion
{
set
{
this.dataVersion = value;
this.OnPropertyChanged("DataVersion");
}
get { return this.dataVersion; }
}

WCF generated C# at Client side code:
[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true, Order=37)]
public long DataVersion {
get {
return this.DataVersionField;
}
set {
if ((this.DataVersionField.Equals(value) != true)) {
this.DataVersionField = value;
this.RaisePropertyChanged("DataVersion");
}
}
}

Any idea ?

Best Regards,
Thanks in advance,
Péter

Sesztak
Posts: 172
Joined: Fri Jun 24, 2016 2:19 am

Re: dataGrid cell animation + dataobject update doesn't work at same time

Postby Sesztak » Tue Sep 20, 2016 11:00 am

one more bit:
if we manually remove the if ((this.DataVersionField.Equals(value) != true)) condition from WCF generated code, like this:

[System.Runtime.Serialization.DataMemberAttribute(IsRequired=true, Order=37)]
public long DataVersion {
get {
return this.DataVersionField;
}
set {
//if ((this.DataVersionField.Equals(value) != true)) {
// this.DataVersionField = value;
// this.RaisePropertyChanged("DataVersion");
//}
this.DataVersionField = value;
this.RaisePropertyChanged("DataVersion");
}
}

Everything works as expected !! :)))

Hey, Guys ! , is a long not supported or buggy ? Should we use Int64 or a simple int instead ? ;)

Please, double check it with WCF ServiceUpdate scenario.

I hope it help others: workaround : use simple int with Server - Client common class properties -if possible.

Best Regards,
Péter


Return to “Bug Reports”

Who is online

Users browsing this forum: No registered users and 29 guests

 

 

cron