We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Two way binding?

Thread ID:

Created:

Updated:

Platform:

Replies:

115877 Feb 17,2014 11:26 AM UTC Feb 26,2014 07:38 AM UTC WinRT 7
loading
Tags: SfChart
Klemen Ošlaj
Asked On February 17, 2014 11:26 AM UTC

I am wondering if TwoWay binding works for charts ItemSource? I think I've done everything as it should be, but with no success.

XAML:
ItemsSource="{Binding dataList, Mode=TwoWay}"

CS:
private void dragEnd(object sender, Syncfusion.UI.Xaml.Charts.ChartDragEndEventArgs e)
{
        Debug.WriteLine(((listOfCharts)((ObservableDictionary)this.DataContext)["Item"]).dataList[1].NoOfUsers);
}

So after dragging is complete dragEnd method writes me in debuger the same value as it was before...not changed one.
Am I doing something wrong here?

Karthikeyan V [Syncfusion]
Replied On February 19, 2014 04:19 AM UTC

Hi Klemen,

 

Thank you for using Syncfusion products.

 

We have analysed the reported requirement. You can change the underlying collection in drag and drop with series or segments. But we need to set the UpdateSource property as True in series.

 

Code snippet [XAML]:

 

<chart:LineSeries Label="Sports" ItemsSource="{Binding CategoricalDatas}"  UpdateSource=”True”

                    XBindingPath="Category" YBindingPath="Value"

                    EnableSeriesDragging="True"/>

 

Please let us know if you require further assistance on this.

 

Thanks,

Karthikeyan V.

 


Klemen Ošlaj
Replied On February 20, 2014 01:56 PM UTC

Hi Klemen,

 

Thank you for using Syncfusion products.

 

We have analysed the reported requirement. You can change the underlying collection in drag and drop with series or segments. But we need to set the UpdateSource property as True in series.

 

Code snippet [XAML]:

 

<chart:LineSeries Label="Sports" ItemsSource="{Binding CategoricalDatas}"  UpdateSource=”True”

                    XBindingPath="Category" YBindingPath="Value"

                    EnableSeriesDragging="True"/>

 

Please let us know if you require further assistance on this.

 

Thanks,

Karthikeyan V.

 


Yes, it works now, thanks.
I would like to ask you another question.

What this error means: "Error: BindingExpression path error: 'StrokeDashArray' property not found on 'Syncfusion.UI.Xaml.Charts.ColumnSeries'."
Everything working as expected, but I still get this error.

Klemen Ošlaj
Replied On February 20, 2014 07:39 PM UTC

and one other thing, which event can I use, when I, for an example, drag charts column(other interactions also) and wish new value to appear in debugger. DragEnd doesn't seems to work properly, because when I check for changed value there, it shows me an old one, not updated.

Karthikeyan V [Syncfusion]
Replied On February 21, 2014 01:21 PM UTC

Hi Klemen,

Thanks for the update.

We have analysed the reported requirement. We have prepared a sample that tries to meet your requirement and the same can be downloaded from the below link.

Note: We have planned to change the behaviour of drag and drop event in our upcoming volume 1 release, which will resolve your issue.

Please let us know if you require further assistance on this.

Thanks,

Karthikeyan V.


Attachment: DragAndDropWinRT_f0f8b23f.zip

Karthikeyan V [Syncfusion]
Replied On February 21, 2014 06:29 PM UTC

Hi Klemen,

Please ignore the previously uploaded sample.

Query: BindingExpression path error

We are already fixed these issues. The fix for this issue is estimated to be available on our upcoming volume 1 release 2014.

Thanks,

Karthikeyan V.


Attachment: DragAndDropWinRT_ede9332c.zip

Klemen Ošlaj
Replied On February 24, 2014 12:40 PM UTC

Hi Karthikeyan V.

Thanks for this solution.
I found one that also works, but I dare to aks of you, to check if it is good enough,

private void dragEnd(object sender, Syncfusion.UI.Xaml.Charts.ChartDragEndEventArgs e)
{
      this.DragEnd = true;
}

private void pointerReleased(object sender, PointerRoutedEventArgs e)
{
     if (this.DragEnd)
     {
           chartHolder.DataContext = null;
           chartHolder.DataContext = ((listOfCharts)defaultViewModel["Item"]);
           this.DragEnd = false;
     }
}

Karthikeyan V [Syncfusion]
Replied On February 26, 2014 07:38 AM UTC

Hi Klemen,

 

Thanks for the update.

 

We analysed your suggested solution and it could be used to meet your requirement. Please let us know if you require further assistance on this.

 

Thanks,

Karthikeyan V.


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;