Hi,
first, little question, I wanted to know if it's possible to have sparklines with decimal YValue. I had some problem to do it. I had to change it to double.
I'm using RIA Service with linq to entities. In my SQL server database, I have to work with money type fields, these fiels become decimal in linq to entites.
Then, I wanted to adapt this code found here to sparklines:
http://blogs.telerik.com/rossenhristov/posts/10-01-07/asynchronous_master-details_with_radgridview_for_silverlight_and_wcf_ria_services.aspx
However, instead of having some details, I have a sparkline column.
I have a list of projects (mainly ProjectId and ProjectTitle attributes).
In my converter, I'm doing like in the master-details example:
- The converter is calling a ria query to get asynchronously a list of entities (from a ProjectId parameter)
- The converter returns then the corresponding dataview.
Each entity has a Double attribute Alloc and a DateTime attribute DateAcctPrd.
Then in the xaml code, I bind the converter like in the following xaml code. However, I have an NullReferenceException when I run my code.
(If I'm doing a master detail, I can see in the details the list of entities, so my query is working well. If I don't add any YValuePath, I have of course a constant value in the sparklines but I don't have any exception)
Could you help me with that?
first, little question, I wanted to know if it's possible to have sparklines with decimal YValue. I had some problem to do it. I had to change it to double.
I'm using RIA Service with linq to entities. In my SQL server database, I have to work with money type fields, these fiels become decimal in linq to entites.
Then, I wanted to adapt this code found here to sparklines:
http://blogs.telerik.com/rossenhristov/posts/10-01-07/asynchronous_master-details_with_radgridview_for_silverlight_and_wcf_ria_services.aspx
However, instead of having some details, I have a sparkline column.
I have a list of projects (mainly ProjectId and ProjectTitle attributes).
In my converter, I'm doing like in the master-details example:
- The converter is calling a ria query to get asynchronously a list of entities (from a ProjectId parameter)
- The converter returns then the corresponding dataview.
Each entity has a Double attribute Alloc and a DateTime attribute DateAcctPrd.
Then in the xaml code, I bind the converter like in the following xaml code. However, I have an NullReferenceException when I run my code.
(If I'm doing a master detail, I can see in the details the list of entities, so my query is working well. If I don't add any YValuePath, I have of course a constant value in the sparklines but I don't have any exception)
Could you help me with that?
<telerik:GridViewDataColumn Header="Title" DataMemberBinding="{Binding ProjectTitle}" />
<telerik:GridViewDataColumn Header="Evolution">
<telerik:GridViewDataColumn.CellTemplate>
<DataTemplate>
<telerik:RadLinearSparkline ShowFirstPointIndicator="True" ShowLastPointIndicator="True"
ShowHighPointIndicators="True" ShowLowPointIndicators="True"
ItemsSource="{Binding Project_ID,Converter={StaticResource SparkConverter}}"
YValuePath="Alloc" YWidth="200" Height="20" />
</DataTemplate>
</telerik:GridViewDataColumn.CellTemplate>
</telerik:GridViewDataColumn>