Telerik Forums
UI for WPF Forum
1 answer
163 views
I want draw scatter line chart like Excel X Y Scatter Chart.
I have data with null values that I want to plot on the scatter line chart,
When I tried to do that it shows points but there is no line connecting that points.

There are two series in my chart

Series 1
 At X axis- 2004/3/31  2004/12/31   2005/3/31 2005/12/31  2006/3/31 2006/12/31
 At Y axis-    2000               null               3000           null               4000          null

Series 2
 At X axis- 2004/3/31  2004/12/31   2005/3/31 2005/12/31  2006/3/31 2006/12/31
 At Y axis-    null               4000               null           5000               null          6000

when I tried to plot this data it showed only points at respective dates. So how to draw continuous line from start to end joining this points. 
Milena
Telerik team
 answered on 27 Aug 2014
2 answers
134 views
Hello,

    I'm currently modifying the OrgChart example to add the ability to build a hierarchy inside a team (a team member can have children team member).
    To be able to know if the user is dragging a Team Member over another one I've modified the OgChartDiagram.GetShapeUnderPosition() to be able to get a list of shapes instead of the top shape :

public List<RadDiagramShape> GetShapeUnderDragPosition()
{
    List<IShape> ShapeList = this.ServiceLocator.GetService<IHitTestService>().GetTopShapesUnderPoint(this.currentDragPosition).ToList();
 
    List<RadDiagramShape> RetList = new List<RadDiagramShape>();
 
    foreach (IShape shape in ShapeList)
    {
        if (shape is RadDiagramShape)
        {
            RetList.Add((RadDiagramShape)shape);
        }
    }
 
    return RetList;
}

My problem is that the method always return a single team item, never a team member.
(I also changed the inheritance of OrgTeamMemberViewModel to make it inherit from HierarchicalNodeViewModel instead of ViewModelBase..

is GetTopShapesUnderPoint() the right method to use for this ?

Thanks !
Pavel R. Pavlov
Telerik team
 answered on 27 Aug 2014
1 answer
134 views
Hi, I want to get the main ribbon window's correct top/left location when it is maximized.
I set some pop-up dialogs' locations based on the main ribbon window's top/left location, and it works fine when it is in the restored state.
When I maximized it, however, the previous location before maximization seems to be used.
I could just use (0, 0) location for a single monitor maybe, but how can I get the right location for dual monitors?
Pavel R. Pavlov
Telerik team
 answered on 27 Aug 2014
3 answers
327 views
Hi,
  I am using a RadMap that depicts a number of physical area around the map that are drawn with MapPolygons.  This works great.  I am trying to put text inside each corner of each MapPolygon to tell users what area they are viewing.  I need the scale of this text to match the map's scale as the user zooms in and out.  I have added labels with a number of approaches, but I always find that they don't scale correctly  when you zoom in.  For example, in the attached file you will see how the text gets very small as you zoom in.  In that file you will also see the way I need the text to look.

 In this example the following code gets executed for each corner in a given MapPolygon that I am trying to label:

                Grid grid = new Grid();
                grid.Background = new SolidColorBrush(Colors.White);
                TextBlock text = new TextBlock();
                text.Foreground = new SolidColorBrush(Colors.Purple);
                text.Text = "My Label Data";
                grid.Children.Add(text);

                Location newLocation = ... (based on MapPolygon corner)
                MapLayer.SetLocation(grid, newLocation);
                this.informationLayer.Items.Add(grid);

  Is there a way to add text to a RadMap and have it keep its location and scale correctly as a user zooms in/out?

Thanks.

James
Top achievements
Rank 1
 answered on 27 Aug 2014
3 answers
440 views
I'm having problems adding CartesianGridLineAnnotations to my RadCartesianCharts. I've read the documentation on this page : http://www.telerik.com/help/wpf/radchartview-annotations-gridline.html and followed the example answer given in this forum post : http://www.telerik.com/forums/cartesian-chart-without-adding-new-axis-for-custom-line but whenever I try to add the annotation I get an error. 

In the forum post you give the following example: 

[code]
<telerik:RadCartesianChart x:Name="chart">
   <telerik:RadCartesianChart.VerticalAxis>
      <telerik:LinearAxis />
   </telerik:RadCartesianChart.VerticalAxis>
   <telerik:RadCartesianChart.Annotations>
   <telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=chart, Path=VerticalAxis}" Value="25" />
[/code]

Which sets up the chart and axis, then adds the CartesianGridLineAnnotation, binding the Axis value to ther VerticalAxis in the element named "chart." 

My code is as follows:

[code]
<telerik:RadCartesianChart x:Name="SummaryChart" UseLayoutRounding="True" Grid.Row="1" TooltipTemplate="{Template}">
   <telerik:RadCartesianChart.HorizontalAxis>
      <telerik:CategoricalAxis LabelFitMode="Rotate" />
   </telerik:RadCartesianChart.HorizontalAxis>
                                              
   <telerik:RadCartesianChart.VerticalAxis>
      <telerik:LinearAxis />
   </telerik:RadCartesianChart.VerticalAxis>
                                              
   <telerik:RadCartesianChart.Annotations>
      <telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=SummaryChart, Path=VerticalAxis}" Value="6" Stroke="Red" StrokeThickness="1"/>
   </telerik:RadCartesianChart.Annotations>
[/code]

As far as I can tell this is following your example of how to bind to the Vertical axis. 

However when I use this XAML I get the following binding error:

System.Windows.Data Error: 4 : Cannot find source for binding with reference 'ElementName=SummaryChart'. BindingExpression:Path=VerticalAxis; DataItem=null; target element is 'CartesianGridLineAnnotation' (Name=''); target property is 'Axis' (type 'CartesianAxis')

Do you know what I'm doing wrong? 

Thanks,

Andy.






Martin Ivanov
Telerik team
 answered on 27 Aug 2014
6 answers
190 views
I'd like to react when a user changes the carret postion to a new cell inside a table.

I have tried hooking up to the Document.CaretPosition.PositionChanged event. But the event doesn't seem to fire as expected. It only fires once, when the RadRichTextBox in instantiated.

Any suggestion as to how handle this?
Petya
Telerik team
 answered on 27 Aug 2014
3 answers
381 views
I want to extend date time picker control and instead of plain text box i want to use telerik masked date time input control in that.  Kindly suggest how can i update the default template for the date time picker control to replace textbox 
Yana
Telerik team
 answered on 27 Aug 2014
1 answer
133 views
"By default the Virtualization feature of the RadDiagram is enabled. "

however, examples in SDK samples are UI virtualization is ineffectual.
Can I obtain a sample program that virtualization feature is correctly?

1.png : sample "layout" in SDK samples.
2.png : RadDiagram virtualizing is enabled.
3.png : generated visuals for all shapes.
Pavel R. Pavlov
Telerik team
 answered on 27 Aug 2014
2 answers
170 views
I am using 2013 q3 of the radgridview, and I need to validate my object in the row validating and cell validating event because some properties are required field.  In the row validating event, I'm explicitly clearing all the validationResults and appending 1 or more new validationresults to certain properties.  However, I found that Cell.Errors are not cleared when I clear validationResults, instead they are appeneded everytime I add a new validationresult in the row validating event.  How do I clear individual cell errors?


//rowvalidating event
if(conditionNotValid)
{
var r = param as Telerik.Windows.Controls.GridViewRowValidatingEventArgs;
r.IsValid = false;
r.ValidationResults.Clear();


foreach (.Infrastructure.ValidationError error in errors)
{
              r.ValidationResults.Add(new GridViewCellValidationResult() { ErrorMessage = error.ErrorMessage, PropertyName = error.PropertyName });
}

return;
}


//////////////////////
//Cell validating event
////////////////////// 
var c = param as Telerik.Windows.Controls.GridViewCellValidatingEventArgs;
c.Cell.Errors // errors does  not get cleared, but gets appended to this list !!!!!!!!!!














































Dimitrina
Telerik team
 answered on 27 Aug 2014
1 answer
232 views
HI.

In the following example, I use a RadComboBox with TextSearchMode="Startswith".

<telerik:RadComboBox  
                        ItemsSource="{Binding RelativeSource={RelativeSource FindAncestor,  AncestorType={x:Type UserControl}},Path=DataContext.Sagsbehandler}" 
                        SelectedValue="{Binding SagsbehandlerId, ValidatesOnDataErrors=True, UpdateSourceTrigger=LostFocus}" 
                        SelectedValuePath="SagsbehandlerId"
                        DisplayMemberPath="Navn"                    
                        IsEditable="True"
                        TextSearchMode="StartsWith"
                        >
When typing the first letters of an item in the itemssource, the first match is selected/autocompleted in the editable area.

However: If I change TextSearchMode to "Contains", there is no autocompletion as I initially would have expected. Only the typed text is shown and the user has no clue if the typed text has any match in the itemssource.
How can I change this behaviour? That is, how can I enable autocompletion when using a contains search.


Alek
Telerik team
 answered on 27 Aug 2014
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?