I did all I can Still I cannot take away the line spacing after hitting "Enter", I could not get it working (looks like the DocumentInheritsDefaultStyleSettings is interfering?)
I have uploaded a sample project (that tells the behavior) as well.
Please find the code I used below.
<telerik:RadRichTextBox x:Name="custNotesRichTextBox"Hi,
I am having an issue with RadDiagramConnections not binding from the source to the target on RadTabItems after the 1st tab. Here is my UserControl layout.
The 1st RadTabItem Diagram loads as it should (no issues). The 2nd RadTabItem diagram only loads the shapes and not the connections. During initialization of the software, Visual Studio Output window shows "Cannot find source for binding with reference" for all of the connections on the 2nd diagram. How do I get the Connections to load properly?
Hi..
I'm trying to implement a Custom Filter for a computed column in RadGridView.
The computed column is simply a Year-range eg: "2010-2015" - i want to filter all rows that contains a given year, eg: 2013.
Tthe computed column is using this type, where i've added the IEquitable interface.
public class YearRange : IEquatable<int>
{
public int FromYear { get; set; }
public int ToYear { get; set; }
public override string ToString()
{
return FromYear + "-" + ToYear;
}
public bool Equals(int other)
{
return FromYear >= other && other <= ToYear;
}
}
The CustomGridFilter is implemented like this, where i've copied the telerik sample and modified it a bit.
public partial class CustomGridFilter : UserControl, IFilteringControl
{
private GridViewBoundColumnBase column;
private CompositeFilterDescriptor compositeFilter;
private FilterDescriptor rangeFilter;
#region IsActive DependencyProperty
public bool IsActive
{
get { return (bool)GetValue(IsActiveProperty); }
set { SetValue(IsActiveProperty, value); }
}
public static readonly DependencyProperty IsActiveProperty =
DependencyProperty.Register(
"IsActive",
typeof(bool),
typeof(CustomGridFilter),
new PropertyMetadata(false));
#endregion
#region Aargang DependencyProperty
public int Aargang
{
get { return (int)GetValue(AargangProperty); }
set { SetValue(AargangProperty, value); }
}
public static readonly DependencyProperty AargangProperty =
DependencyProperty.Register(
"Aargang",
typeof(int),
typeof(CustomGridFilter),
new PropertyMetadata(0)
);
#endregion
public CustomGridFilter()
{
InitializeComponent();
DataContext = this;
}
public void Prepare(Telerik.Windows.Controls.GridViewColumn column)
{
this.column = column as GridViewBoundColumnBase;
if (this.column == null)
{
return;
}
if (compositeFilter == null)
{
CreateFilters();
}
}
private void CreateFilters()
{
string dataMember = column.DataMemberBinding.Path.Path;
compositeFilter = new CompositeFilterDescriptor();
rangeFilter = new FilterDescriptor(dataMember, FilterOperator.IsEqualTo, null);
compositeFilter.FilterDescriptors.Add(rangeFilter);
}
private void OnFilter(object sender, RoutedEventArgs e)
{
rangeFilter.Value = Aargang;
if (!column.DataControl.FilterDescriptors.Contains(compositeFilter))
{
column.DataControl.FilterDescriptors.Add(compositeFilter);
}
IsActive = true;
var popup = this.ParentOfType<System.Windows.Controls.Primitives.Popup>();
if (popup != null)
{
popup.IsOpen = false;
}
}
private void OnClear(object sender, RoutedEventArgs e)
{
if (column.DataControl.FilterDescriptors.Contains(compositeFilter))
{
column.DataControl.FilterDescriptors.Remove(compositeFilter);
}
Aargang = 0;
IsActive = false;
var popup = this.ParentOfType<System.Windows.Controls.Primitives.Popup>();
if (popup != null)
{
popup.IsOpen = false;
}
}
}
The XAML is simply a textbox bound to the Aargang DependencyProperty which is functioning correctly considering the error message.
My assumption is that IEquiatable<int> is supposed to execute the FilterOperator.IsEqualTo comparison ?
Why does it fail ?
EDIT:
Debugging the "solution" from this question, https://www.telerik.com/forums/problem-with-custom-filter-with-custom-type - i've found that IEquatable is used for the GetDistinctValues operation while the ACTUAL comparison uses standard override Equals operator ... FFS...
The item source of this gridview is bound to a DataTable programmatically. The amount of columns change depending on how many days the user wants to see. I need all of the Date cells to have a foreground (Text colour) of red if they do not equal the number in the expected column.
I have tried many ways of accomplishing this but nothing seems to work.
Thank you in advance.
Hello,
I am using the same code and the fallowing template displaying Binary info
:
<DataTemplate DataType="{x:Type viewModels:GraphElementViewModelDigital}">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition MinWidth="100"/>
</Grid.ColumnDefinitions>
<telerik:RadCartesianChart x:Name="CartesianChart"
Grid.Column="1"
VerticalAlignment="Center"
HorizontalAlignment="Stretch"
MinHeight="40"
Margin="0,5,0,4">
<!--<telerik:RadCartesianChart.Behaviors>
<telerik:ChartPanAndZoomBehavior ZoomMode="Both"/>
<telerik:ChartTrackBallBehavior ShowIntersectionPoints="True"
ShowTrackInfo="True"
SnapMode="AllClosePoints"/>
</telerik:RadCartesianChart.Behaviors>-->
<telerik:RadCartesianChart.Series>
<telerik:StepLineSeries
CategoryBinding="DateTimeCategory"
ValueBinding="Value"
Stroke="White"
ItemsSource="{Binding ChartData}">
<!--<telerik:StepLineSeries.Style>
<Style TargetType="telerik:StepLineSeries">
<Style.Triggers>
<DataTrigger Binding="{Binding ElementKind}" Value="Command">
<Setter Property="Stroke" Value="{StaticResource ElementGreenHeaderForeground}"></Setter>
</DataTrigger>
<DataTrigger Binding="{Binding ElementKind}" Value="Report">
<Setter Property="Stroke" Value="{StaticResource ElementBlueHeaderForeground}"></Setter>
</DataTrigger>
</Style.Triggers>
</Style>
</telerik:StepLineSeries.Style>-->
</telerik:StepLineSeries>
</telerik:RadCartesianChart.Series>
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:DateTimeContinuousAxis Visibility="Hidden"
Minimum="{Binding NewDateTime }"
Maximum="{Binding MaxDateTime}"
/>
</telerik:RadCartesianChart.HorizontalAxis>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis Visibility="Hidden"
Minimum="0"
Maximum="1"
/>
</telerik:RadCartesianChart.VerticalAxis>
</telerik:RadCartesianChart>
<StackPanel Orientation="Horizontal"
Grid.Column="0">
<TextBlock
Foreground="WhiteSmoke"
Margin="5,0,10,5"
Text="{Binding ElementPhysicalUnitsLabel}"
x:Name="ElementPhysicalUnitsLabel"/>
<TextBlock
Text="{Binding Value}"
FontWeight="Bold"
FontSize="15"
Foreground="WhiteSmoke"/>
</StackPanel>
</Grid>
</DataTemplate>
The visibility of the line is different:
for windows 10 as image t3 user see only changes from 0 to 1 or 1 to 0.
while in windows 7 t4 you can see the ChartData as a line indicating value of the graph and changes in value.
Any help will be appreciated
Sarit Harel
I have a GridView that display about 110K rows of data ...
One of the columns needs to contain a DateRange or Year-Range as shown in the attached picture.
Currently the data is a string "2012-2015" - i can change this if needed.
Is is possible to filter for years that are equal or between two years ?
eg: I want to find rows that were active in 2014 - meaning all rows that contain a range that includes 2014 : eg "2013-2015"
Any help is appreciated :)
Hello,
Is there any way to change appearance of connecting lines to dotted lines of WPF RadTreeView? I am looking for something similar to WinForms RadTreeView LineStyle property.
I have added attachment for reference.
Thank You.
Is this possible? I have a custom column:
public class GridViewPasswordColumn : GridViewBoundColumnBase
{
public GridViewPasswordColumn()
{
EditTriggers = GridViewEditTriggers.CellClick;
}
public override FrameworkElement CreateCellElement(GridViewCell cell, object dataItem)
{
return new TextBlock {Text = "**********"};
}
public override FrameworkElement CreateCellEditElement(GridViewCell cell, object dataItem)
{
var picker = new RadPasswordBox();
return picker;
}
public override object GetNewValueFromEditor(object editor)
{
RadPasswordBox passwordBox = editor as RadPasswordBox;
return passwordBox.Password;
}
}
Which I use in the xaml:
<thcg:GridView ItemsSource="{Binding Users}" CanUserInsertRows="True" NewRowPosition="Top"
AutoGenerateColumns="False" hse:GridBindingHelper.ComboColumnBinder="{Binding BusinessUnitBinders}" >
<tkg:RadGridView.Columns>
<thcg:GridViewPasswordColumn Header="Password" DataMemberBinding="{Binding PasswordClear}" MinWidth="100" UniqueName="colPassword" >
</thcg:GridViewPasswordColumn>
However the setting for PasswordClear is never called. What am I doing wrong?
Thanks