Telerik Forums
UI for WPF Forum
3 answers
574 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
254 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
457 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
181 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
221 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
275 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
3 answers
184 views
I am using a horizontally sliced TreeMap. Is it possible to control the VERTICAL distance (Y-Direction)?  I understand the horizontal distance is determined by the values (X-Direction).  

Ideally, the space would be equidistant vertically with all 3 groups having the same vertical distance.  Similar to a Grid with 3 RowDefinitions where Height="*"

Current XAML:
01.<telerik:RadTreeMap x:Name="TreeMap"  Grid.Row="0" Grid.Column="2"
02.  ClipToBounds="True" >
03. 
04.     <telerik:RadTreeMap.LayoutStrategy>
05.          <telerik:SliceDiceStrategy Orientation="Horizontal" />
06.     </telerik:RadTreeMap.LayoutStrategy>
07. 
08.     <telerik:RadTreeMap.TypeDefinitions>
09.           <telerik:TypeDefinition TargetTypeName="ModelInfo"
10.              ValuePath="Value" ChildrenPath="Children" LabelPath="Name"
11.              ItemStyle="{StaticResource IcicleStyle}" />
12. 
13.            <telerik:TypeDefinition TargetTypeName="GroupInfo"
14.              ValuePath="Value" ChildrenPath="Children" LabelPath="Name"
15.              ItemStyle="{StaticResource IcicleStyle}" />
16. 
17.            <telerik:TypeDefinition TargetTypeName="EventInfo"
18.              ValuePath="Value" LabelPath="Name"
19.              ItemStyle="{StaticResource IcicleStyle}" />
20. 
21.      </telerik:RadTreeMap.TypeDefinitions>
22. 
23.</telerik:RadTreeMap>

StaticResource IcicleStyle:

1.<Style x:Key="IcicleStyle" TargetType="telerik:RadTreeMapItem" >
2.    <Setter Property="Control.Background" Value="White" />
3.    <Setter Property="MaxHeight" Value="50" />
4.    <Setter Property="FontFamily" Value="Segoe UI" />
5.    <Setter Property="FontWeight" Value="SemiBold" />
6.    <Setter Property="Margin" Value="-1" />
7.    <Setter Property="Padding" Value="0" />
8.</Style>


A screenshot of the current layout is attached.  If you look at the last section labelled "S", Ideally,  (S.Height === %G1.Height).  Even if I remove the third level of data {1,2,3,4}, the result is the same.

Any help is appreciated.

Thanks,
Jacob
Petar Marchev
Telerik team
 answered on 27 Aug 2014
3 answers
374 views
HI,

I'm trying to use your Diagram control which is very cool by the way. But i'm struggling to understand how the structure works inside. Can I ask if you can compose one fully working example of OrgChart diagram like in demo. So I can study it.

Thanks in advance
Pavel R. Pavlov
Telerik team
 answered on 27 Aug 2014
1 answer
310 views
Hi Team,
I have the following columns in a grid in my MVVM project.
checkbox_Column Textbox1_column Textbox2_Column.

My requirement is - when i check the checkbox, Textbox2_Column should get disabled and when i un-check the checkbox Textbox1_column should get disabled.

Can you please tell me how to do this.

Thanks,
Dimitrina
Telerik team
 answered on 26 Aug 2014
2 answers
442 views
Hi,
I am facing an Issue with binding in RadGrid. Here is my XAML

 <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsTermChange}"  Header="Change Term" x:Name="TermChange">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsTermChanged, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsActive}"  Header="Change Mileage">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsActive}"  Header="Add Option">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <Grid>
                                <CheckBox Name="optionCheckBox"/>
                            </Grid>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsActive}"  Header="Add Maint.">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewDataColumn Width="Auto" DataMemberBinding="{Binding IsActive}"  Header="Remove Maint.">
                    <telerik:GridViewDataColumn.CellTemplate>
                        <DataTemplate>
                            <CheckBox IsChecked="{Binding IsActive, Mode=TwoWay}"/>
                        </DataTemplate>
                    </telerik:GridViewDataColumn.CellTemplate>
                </telerik:GridViewDataColumn>
                <telerik:GridViewColumn Header="Proposed Term" >
                    <telerik:GridViewColumn.CellTemplate>
                        <DataTemplate>
                            <telerik:RadComboBox Width="80" HorizontalAlignment="Left" Margin="3,1,0,0" Text="{Binding Path=TermRequested, Mode=TwoWay,   UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, NotifyOnValidationError=True}" IsEditable="True" ItemsSource="{Binding AvailableTermsList}" StaysOpenOnEdit="True" />
                        </DataTemplate>
                    </telerik:GridViewColumn.CellTemplate>
                </telerik:GridViewColumn>

I want to bind the IsEnabled property of radcombobox (bold one) only when IsChecked property is true for checkbox(bold one). I am not abble to achieve that. Please help it is urgent.






Shreya
Top achievements
Rank 1
 answered on 26 Aug 2014
Narrow your results
Selected tags
Tags
GridView
General Discussions
Chart
RichTextBox
Docking
ScheduleView
ChartView
TreeView
Diagram
Map
ComboBox
TreeListView
Window
RibbonView and RibbonWindow
PropertyGrid
DragAndDrop
TabControl
TileView
Carousel
DataForm
PDFViewer
MaskedInput (Numeric, DateTime, Text, Currency)
AutoCompleteBox
DatePicker
Buttons
ListBox
GanttView
PivotGrid
Spreadsheet
Gauges
NumericUpDown
PanelBar
DateTimePicker
DataFilter
Menu
ContextMenu
TimeLine
Calendar
Installer and Visual Studio Extensions
ImageEditor
BusyIndicator
Expander
Slider
TileList
DataPager
PersistenceFramework
Styling
TimeBar
OutlookBar
TransitionControl
FileDialogs
Book
ToolBar
ColorPicker
TimePicker
MultiColumnComboBox
SyntaxEditor
VirtualGrid
NavigationView (Hamburger Menu)
Wizard
ExpressionEditor
WatermarkTextBox
DesktopAlert
BarCode
SpellChecker
DataServiceDataSource
EntityFrameworkDataSource
RadialMenu
ChartView3D
Data Virtualization
BreadCrumb
LayoutControl
ProgressBar
Sparkline
TabbedWindow
ToolTip
CloudUpload
ColorEditor
TreeMap and PivotMap
EntityFrameworkCoreDataSource (.Net Core)
HeatMap
Chat (Conversational UI)
VirtualizingWrapPanel
Calculator
NotifyIcon
TaskBoard
TimeSpanPicker
BulletGraph
Licensing
WebCam
CardView
DataBar
FilePathPicker
Callout
PasswordBox
SplashScreen
Localization
Rating
Accessibility
CollectionNavigator
AutoSuggestBox
Security
VirtualKeyboard
HighlightTextBlock
TouchManager
StepProgressBar
Badge
OfficeNavigationBar
ExpressionParser
CircularProgressBar
SvgImage
PipsPager
SlideView
AI Coding Assistant
InlineAIAssistant
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?