My objects look something like this: Lastly we create a BindingPath. Use the PointTemplate property of the series. FromArgb , byte rnd. So the bindings will look like this: The data context of each data point will be a DataRowView object.

Lastly we create a BindingPath. Next 1, ,. Next 0, , byte rnd. Since the Series collection of the XamDataChart is read-only, in order to be able to generate the Series dynamically,based on you VeiwModel, you should use helper class, similar to the approach that Graham Murray has suggested in the thead that you have referred. Run the application and this is what you get. Sign up using Email and Password. Run the application and lets see what we get. And also you will need to define the size Width and Height of the Path.

Simply change these indices for you data. Resources property of our View.

How to use a DataTable as the ItemsSource for a LineSeries?

Sign up or log in Sign up using Google. Of course, you can always make this more functional by including logic to determine what editor to use for what column, or what type the value should be edited as for different columns. The data context passed in the Xamdatacart of the ScatterPointSeries and several other series is not the DataPoint dyanmic, but the context of the series.


If you have any questions you can contact me sries my blog at http: FromArgbbyte rnd. Is seems it should be possible to use a DataTable. My objects look something like this: Post as a guest Name. Next we need a ViewModel.

We just need to add some code and a little bit of XAML.

How to use a DataTable as the ItemsSource for a LineSeries?, WPF Elements forum – Mindscape

Posted on Dec 14 You can download the sample from here: As you can see we have a single property that exposes a collection of Xammdatachart. Mindscape Megapack All Mindscape products for one awesome price! If so, how would I specify which columns to use for the xAxis and the yAxis? This section contains the data model used for the series xxmdatachart in this article and also how to set it up.

The first one being the Name. From what I can gather from old posts in the Infragistics support forums, the Series property is read only and thus doesn’t support binding directly.

Alright, first thing is first. We need a data source for our XamComboEditor.

This is going to give us our column header. We need to create our columns based off the number of Periods in the Periods Collection of the StaffMember. We want to set three important properties. Next we serie to add an instance of our HoursDataSource object.


You can do this however you want.

XamDataGrid–Dynamically Create and Data Bind Columns with an Editor of your Choice

Our editor functions like it should warning you that the new value does not match the mask required for valid input. In this particular case, we need to flatten out a collection of objects to be represented as columns in the grid. You have no idea how many there will be.

I would recommend some kind of definition object that will define what columns and how many columns to build.

Now, keep in mind that our random data is less than 3 digits, but this is just being used as an example. There are couple approaches which could be used to bind the color from the data object to the fill of xwmdatachart data point visual the bar. You can download the sample from here:.

My objects look something like this:. So how do we start generating columns? Krasimir Krasimir 46 1. Mindscape is a registered trademark of Mindscape Limited. By setting the Field.

Was this article helpful?

Related Posts