Telerik Forums
UI for WPF Forum
1 answer
117 views
I am applying a zooming option on my rad chart control and I had a problem where by the scroll bar crashed the entire application (if the unit of zooming was too small). Is there a way that I could zoom in/out without the scroll bar?
Also, like google charts, do we have a hand icon which we could use to drag across a zoomed in chart. I would really like to have this functionality working as it would be helpful to our clients as they won't need to scroll along the axis and could just drag across the chart with their mouse to view the entire series.

Thanks,
Farhan
Vladimir Milev
Telerik team
 answered on 23 Nov 2010
3 answers
200 views
If I set my provider to the BingMapProvider and set the IsTileCachingEnabled to true, when I exit my application I still have threads running that stop my application from fully closing.

Setting the IsTileCachingEnabled to false at the start avoids the problem, but is there a way that I can clean up the threads being used to provide the cached tiles?

I am using your WPF control within a windows forms application using System.Windows.Forms.Integration.ElementHost

Thanks
Simon
Andrey
Telerik team
 answered on 23 Nov 2010
1 answer
48 views
I am trying to create a line chart, where the Itemmapping is done to two fields of a class and the RadControl.ItemSource is set to a List of objects of that class. The code is as follows:
SeriesMapping sm = new SeriesMapping();
            LineSeriesDefinition sd = new LineSeriesDefinition();
 
            sm.SeriesDefinition = sd;
 
            sm.ItemMappings.Add(new ItemMapping("Value",DataPointMember.YValue));
            sm.ItemMappings.Add(new ItemMapping("Time", DataPointMember.XValue));
            LineChart.SeriesMappings.Add(sm);
            LineChart.ItemsSource = GenerateLineData2(); // Returns a list of LineData objects ...

Here, the class that represents the data point looks as below

public class LineData
        {
            private double _time;
            private double _value;
            public double Time
            {
                get { return _time; }
                set { _time = value; }
            }           
            public double Value
            {
                get { return _value; }
                set { _value = value; }
            }
 
        }

The questions are
1. can I do ItemMapping if the fields 'Value' and 'Time' do not belong to the same class?
2. I have two lists of (say) double values, one for the 'Time' values and other for the 'Value' values; how can I perform the item mapping in that case?

Evgeni "Zammy" Petrov
Telerik team
 answered on 23 Nov 2010
3 answers
118 views
Hello

We where exactly following your DEMO example "grouping and aggregation" with chart and radgrid, which works fine so far.

But when we put a filter in the radgrid the values are not changing, means that the chart is always taking the full data, regardless of the filter in radgrid.

Is there a way to maintain a chart that is "listening" to the radgrid filter?

thanks Thomas
Sia
Telerik team
 answered on 23 Nov 2010
1 answer
211 views
Hi,

I need to programmatically update the sort order for a gridview, for example if I have a list of orders from different companies, in different countries for different amounts, and the user clicks on the country column to sort, I want to add the company and value columns to the sort so that within each country the orders are sorted by company, and within a company the orders are sorted by amount.

I have tried to add these as SortDescriptors in the 'Sorting' event but I cannot get the sort to use the newly added descriptors.

What technique should I be using?

Thanks,
Yavor Georgiev
Telerik team
 answered on 23 Nov 2010
2 answers
99 views
Hello,
I am evaluating Your controls and I would need the interactivity feature for charts, but I can't get it to work.
I am using WPF 4, but nothing. I tried to use the same code in a Silverlight project and there it works perfectly.
You can find my sample project with the WPF and Silverlight application under the following link:
http://www.sendspace.com/file/ap73ki

Could You please tell me what I'm doing wrong?

The only difference I noted was the different Version of the "Telerik.Windows.Controls.Charting".
WPF: 2010.2.924.35
Silverlight: 2010.2.924.1040

Regards
Gernot
Top achievements
Rank 1
 answered on 23 Nov 2010
3 answers
50 views
Hi,

I am trying to do some Geocoding using the BingSearchProvider.  I have been adding british postcodes and there are some that it doesn't like, which causes a crash that I cannot handle

For example, try

B21 0AG

in your Search Demo

If I add 

B21 0AG, Birmingham

then we just get back a Geocoded location for Birmingham as a whole. It works with similar postcodes, for example

B64 6HN
Andrey
Telerik team
 answered on 23 Nov 2010
1 answer
90 views
I am plotting a line graph with a set of test data of only 5 data points and it takes visibly long time to plot the line. Is it some kind of animated behavior that is responsible for this or I am missing something? Please help me on how I can get the line plotted in just one shot - with no visible delay between its start and end ...

The code is as follws:

The data structure that is set to the itemsource of  RadChart control is

private ObservableCollection<KeyValuePair<int, Double>> _datapoints;

The chart is initialised as below:
radchart.DefaultView.ChartArea.AxisX.AutoRange = false;
radchart.DefaultView.ChartArea.AxisX.AddRange(-100, 100, 50);
radchart.DefaultView.ChartArea.AxisX.MajorGridLinesVisibility = Visibility.Visible;
radchart.DefaultView.ChartArea.AxisY.AutoRange = false;
radchart.DefaultView.ChartArea.AxisY.AddRange(-100, 100, 50);
radchart.DefaultView.ChartArea.AxisY.MajorGridLinesVisibility = Visibility.Visible;
SeriesMapping sm = new SeriesMapping();
sm.SeriesDefinition = new LineSeriesDefinition();
sm.SeriesDefinition.ShowItemLabels = false;
sm.ItemMappings.Add(new ItemMapping("Key", DataPointMember.XValue));
sm.ItemMappings.Add(new ItemMapping("Value", DataPointMember.YValue));
radchart.SeriesMappings.Add(sm);
radchart.ItemsSource = _datapoints;

_datapoints.Add(

new KeyValuePair<int, double>(1, 10.0));

 

_datapoints.Add(

new KeyValuePair<int, double>(50, 20.9));

 

_datapoints.Add(

new KeyValuePair<int, double>(80, 80.1));

 

_datapoints.Add(

new KeyValuePair<int, double>(100, 34.8));

 



I have a button to trigger refresh on the control, who handler is as follows:

private void Refresh_Click(object sender, RoutedEventArgs e)
{           
    _datapoints[0] = new KeyValuePair<int, double>(1, Rnd.Next(-100, 100) *   Rnd.NextDouble());
    _datapoints[1] = new KeyValuePair<int, double>(50, Rnd.Next(-100, 100) * Rnd.NextDouble());
    _datapoints[2] = new KeyValuePair<int, double>(80, Rnd.Next(-100, 100) * Rnd.NextDouble());
    _datapoints[3] = new KeyValuePair<int, double>(100, Rnd.Next(-100, 100) * Rnd.NextDouble());
}

Evgeni "Zammy" Petrov
Telerik team
 answered on 23 Nov 2010
1 answer
74 views
Hi,

I would like to set a default error handling method for all of my DatePicker controls in my application. This "default error handling method" is to set the last valid value on focus lost, if the actual value cannot be parsed. This way, I would like to avoid mistyping problems.

For example if the current value is "2010-11-17" and the user types "aaa", I would like to reset the value back to "2010-11-17" on focus lost instead of clearing the value of the control.

My first idea was to set this behavior in App.xaml as part of the default style of DatePicker (by triggers). Is it possible to achieve my goal this way? Could someone please help me with an example on how to do this? If my idea is wrong, could somebody tell me how this task can be solved?
(The application is using the MVVM pattern.)


Thank you for the answer in advance,
                                                             G. M.
George
Telerik team
 answered on 23 Nov 2010
5 answers
68 views
I am displaying a large amount of timestamped data on a WPF RadGridView that has two levels of grouping.
The two indexed fields used for grouping refer to two other classes of object.
I have a value convertor that allows me to display the name field of the group object on the group header
That works very well.

I now have two needs:

1. What I would really like is that when a group header is selected a 'GroupDetail' section would expand
in the same fashion as a RowDetail so that I can display the fields of the grouping object.

2. Within my data I have some rows that are blank except for the time and an index to an event object 

DataTable

time       event   data_0 ... data_n

t0             0           x0             xn

t1             0           y0            yn

t2             e1        nul           nul

t3             0           z0            zn

The event class has different subclasses, They all have a string field but may have different sets of data fields.

I would like to be able to display each event object as a row displaying its string field on a single wide cell, like a group header without the expander.  The RowDetails for that row could then ask the event object to display its particular fields.

Thanks

Rossen Hristov
Telerik team
 answered on 23 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jay
Top achievements
Rank 3
Iron
Iron
Iron
Benjamin
Top achievements
Rank 3
Bronze
Iron
Veteran
Radek
Top achievements
Rank 2
Iron
Iron
Iron
Bohdan
Top achievements
Rank 2
Iron
Iron
Richard
Top achievements
Rank 4
Bronze
Bronze
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?