Hello!
I want not to completely cancel a SelectionChanging event in the GridView but instead just modify AddedItems (remove some of them that are not fitting to the previously selected items). It should look like a normal selection via drag and drop, just with some unselected items in beetween.
Hi Telerik,
We have column data where values are coming in as integer values of 0 or 1 and we are using a converter (using convert and convertback) to convert the 0/1 values to "Y/N" (i.e. simple type to simple type).
The converter is working well, however, the default Filter Control is showing the values "N/N". The filter should be showing "Y/N" or "N/Y" values, instead.
Please find the XAML for the GridViewComboboxColumn below, bound using MVVM.
...
<telerik:GridViewComboBoxColumn DataMemberBinding="{Binding AnIntegerColumn, Converter={StaticResource IntegerToYNConverter}}" Header="AColumn" Width="80">
<telerik:GridViewComboBoxColumn.ItemsSource>
<x:Array Type="{x:Type sys:String}">
<sys:String>Y</sys:String>
<sys:String>N</sys:String>
</x:Array>
</telerik:GridViewComboBoxColumn.ItemsSource>
</telerik:GridViewComboBoxColumn>
...
Could you please advise?
Kind regards.
p.s. If there is a way to make this link fit our approach, please also advise: http://www.telerik.com/blogs/filtering-gridviewcomboboxcolumn-in-radgridview-for-wpf
Hi to all,
I need a RadDiagramContainerShape that has not use auto-sizing capabilities, I would afterthat I add several RectangleShapes into RadDiagramContainerShape, I can't move any RectangleShape outside to RadDiagramContainerShape .
How can I do this? .... Can I do this?
Hi to all,
I don't understand witch event is better to intercept when a Shape was moved.
I need to trace when Shape change position.
Hi,
the vertical alignment of InputGestureText in Office2016 Theme is faulty. In VisualStudio2013 Theme everthing is fine.
How can i correct this?
Thanks!
Hi,
We have an immediate requirement for our client where we need to override the default behavior of the telerik Raddatapager,
Where we need to enable the previous button when we are on the first page and on click of it, Raddatapager should navigate to the last page.
Problem We are facing is that We are not able to enable the previous button when raddatapager is on the first page.
Any support on this will be greatful.
regards,
Jai Singh
Hi,
I'm using RadGridView with multiple columns for which first column is editable with EditTrigger as 'F2'. The value is these will be unique and any conflict is handled by setting HasValidationErrors to true after committing the change and validating the same. The cell will be put back to edit mode in case of a conflict.
In a specific case where there is an error on the cell and the user handles it (by providing a unique value) and commits the change (handled in Enter press), then the error on that cell is removed and the row gets focused. Now when a Down/Up arrow key is pressed, the focus shifts to the row below/above and the cell goes to Edit mode which is not desired.
Similar behavior is seen when 'Tab' key is pressed on and cell that is in editable mode -> Cell in the next rows goes to edit mode.
Below is the call stack which puts the cell in edit mode.
.................
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewCell.IsInEditMode.set(bool value) Unknown
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.SwitchCellToEditMode(Telerik.Windows.Controls.GridView.GridViewCell cell) Unknown
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.BeginEdit(Telerik.Windows.Controls.GridView.GridViewCell gridViewCell, System.Windows.RoutedEventArgs editEventArgs) Unknown
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.BeginEdit(System.Windows.RoutedEventArgs editEventArgs) Unknown
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.OnBeginEditCommand(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) Unknown
PresentationCore.dll!System.Windows.Input.CommandBinding.OnExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.ExecuteCommandBinding(object sender, System.Windows.Input.ExecutedRoutedEventArgs e, System.Windows.Input.CommandBinding commandBinding) Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.FindCommandBinding(System.Windows.Input.CommandBindingCollection commandBindings, object sender, System.Windows.RoutedEventArgs e, System.Windows.Input.ICommand command, bool execute) Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.FindCommandBinding(object sender, System.Windows.RoutedEventArgs e, System.Windows.Input.ICommand command, bool execute) Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.OnExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) Unknown
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) Unknown
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) Unknown
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) Unknown
PresentationCore.dll!System.Windows.Input.RoutedCommand.ExecuteImpl(object parameter, System.Windows.IInputElement target, bool userInitiated) Unknown
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.ExecutePendingCommand() Unknown
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.OnSelectCurrentUnitCommand(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) Unknown
PresentationCore.dll!System.Windows.Input.CommandBinding.OnExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.ExecuteCommandBinding(object sender, System.Windows.Input.ExecutedRoutedEventArgs e, System.Windows.Input.CommandBinding commandBinding) Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.FindCommandBinding(System.Windows.Input.CommandBindingCollection commandBindings, object sender, System.Windows.RoutedEventArgs e, System.Windows.Input.ICommand command, bool execute) Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.FindCommandBinding(object sender, System.Windows.RoutedEventArgs e, System.Windows.Input.ICommand command, bool execute) Unknown
PresentationCore.dll!System.Windows.Input.CommandManager.OnExecuted(object sender, System.Windows.Input.ExecutedRoutedEventArgs e) Unknown
PresentationCore.dll!System.Windows.RoutedEventArgs.InvokeHandler(System.Delegate handler, object target) Unknown
PresentationCore.dll!System.Windows.EventRoute.InvokeHandlersImpl(object source, System.Windows.RoutedEventArgs args, bool reRaised) Unknown
PresentationCore.dll!System.Windows.UIElement.RaiseEventImpl(System.Windows.DependencyObject sender, System.Windows.RoutedEventArgs args) Unknown
PresentationCore.dll!System.Windows.Input.RoutedCommand.ExecuteImpl(object parameter, System.Windows.IInputElement target, bool userInitiated) Unknown
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.ExecutePendingCommand() Unknown
Telerik.Windows.Controls.GridView.dll!Telerik.Windows.Controls.GridView.GridViewDataControl.NextCellFocusedAction.AnonymousMethod__37(System.Windows.FrameworkElement f) Unknown
...........
Please provide info on why this behavior is seen.
Regards,
Raghavendar.K
Hello,
I added axis titles to my chart by adding TextBlocks. When providing the Text and FontSize properties through constant literal values immediately within the xaml code, everything works fine. The plot area is reduced in order to leave enough room for the titles, and the titles itself are centered on the axes' extents.
However, when using bindings in order to provide the values for the Text and FontSize properties from a view model (INotifyPropertyChanged, standard observable properties), the plot area is not reduced to accommodate the titles, resulting in the titles being rendered off-center and either partially or fully outside the chart control's bounds.
I have created a minimal demonstration program, which consists of a main window xaml definition containing the chart:
<
Window
x:Class
=
"WpfApplication2.MainWindow"
xmlns
=
"http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x
=
"http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:telerik
=
"http://schemas.telerik.com/2008/xaml/presentation"
xmlns:wpfApplication2
=
"clr-namespace:WpfApplication2"
Title
=
"MainWindow"
Height
=
"600"
Width
=
"800"
><
DockPanel
LastChildFill
=
"True"
><
telerik:RadCartesianChart
Margin
=
"100"
x:Name
=
"mChart"
BorderBrush
=
"Aquamarine"
BorderThickness
=
"5"
ClipToBounds
=
"False"
><
telerik:RadCartesianChart.DataContext
><
wpfApplication2:ChartViewModel
/></
telerik:RadCartesianChart.DataContext
><
telerik:LineSeries
StrokeThickness
=
"5"
><
telerik:LineSeries.DataPoints
><
telerik:CategoricalDataPoint
Category
=
"A"
Value
=
"2"
/><
telerik:CategoricalDataPoint
Category
=
"B"
Value
=
"5"
/><
telerik:CategoricalDataPoint
Category
=
"C"
Value
=
"3"
/></
telerik:LineSeries.DataPoints
></
telerik:LineSeries
><
telerik:RadCartesianChart.HorizontalAxis
><
telerik:CategoricalAxis
><
telerik:CategoricalAxis.Title
><
TextBlock
Text
=
"{Binding TitleText}"
FontSize
=
"{Binding FontSize, Mode=OneWay}"
/></
telerik:CategoricalAxis.Title
></
telerik:CategoricalAxis
></
telerik:RadCartesianChart.HorizontalAxis
><
telerik:RadCartesianChart.VerticalAxis
><
telerik:LinearAxis
><
telerik:LinearAxis.Title
><
TextBlock
Text
=
"{Binding TitleText}"
FontSize
=
"{Binding FontSize, Mode=OneWay}"
/></
telerik:LinearAxis.Title
></
telerik:LinearAxis
></
telerik:RadCartesianChart.VerticalAxis
></
telerik:RadCartesianChart
></
DockPanel
></
Window
>
The Viewmodel is trivial:
using
System.ComponentModel;
using
System.Runtime.CompilerServices;
using
WpfApplication2.Annotations;
namespace
WpfApplication2
{
class
ChartViewModel : INotifyPropertyChanged
{
#region Fields
private
string
mTitleText;
public
string
TitleText {
get
{
return
mTitleText; }
set
{ SetProperty(
ref
mTitleText, value); } }
private
double
mFontSize;
public
double
FontSize {
get
{
return
mFontSize; }
set
{ SetProperty(
ref
mFontSize, value); } }
#endregion
#region Construction
public
ChartViewModel()
{
mTitleText =
"THIS IS THE AXIS TITLE"
;
mFontSize = 72.0d;
}
#endregion
#region Interface
public
event
PropertyChangedEventHandler PropertyChanged;
#endregion
#region Implementation
protected
bool
SetProperty<TProperty>(
ref
TProperty aStorage, TProperty aValue, [CallerMemberName]
string
aPropertyName =
null
)
{
if
(Equals(aStorage, aValue))
return
false
;
aStorage = aValue;
// ReSharper disable ExplicitCallerInfoArgument
RaisePropertyChanged(aPropertyName);
// ReSharper restore ExplicitCallerInfoArgument
return
true
;
}
public
bool
SetProperty<TProperty>(
ref
TProperty aStorage, TProperty aValue,
ref
bool
aChangedFlag, [CallerMemberName]
string
aPropertyName =
null
)
{
// ReSharper disable once ExplicitCallerInfoArgument
if
(!SetProperty(
ref
aStorage, aValue, aPropertyName))
return
false
;
aChangedFlag =
true
;
return
true
;
}
protected
void
RaiseOtherPropertyChanged(
string
aPropertyName)
{
// ReSharper disable once ExplicitCallerInfoArgument
RaisePropertyChanged(aPropertyName);
}
[NotifyPropertyChangedInvocator]
protected
virtual
void
RaisePropertyChanged([CallerMemberName]
string
aPropertyName =
null
)
{
PropertyChanged?.Invoke(
this
,
new
PropertyChangedEventArgs(aPropertyName));
}
#endregion
}
}
The attached screenshot shows the result. Please note that the aquamarine rectangle is the actual border of the chart, and that the ClipToBounds property is set to false, otherwise the title of the categorical axis would not be visible at all.
My goal is to allow the user to design the axes' titles' appearances dynamically, not only be defining their text, but also their font, font size, weight, etc. Therefore the according properties of the TextBlocks will have to be changed dynamically at run-time. Is there any other way to achieve this without breaking the layout mechanism?
Any help would be greatly appreciated, thanks in advance!
Hi,
on a grid setted as follow:
SelectionMode = extended
SelectionUnit = Mixed
ClipboardPasteMode = AllSelectedCells, Cells, OverwriteWithEmptyValues
I have some trouble on paste date on new rows.
If you paste data on existing rows the event GridView_PastingCellClipboardContent is fired and all it works fine but
when you paste data to create new rows the event GridView_PastingCellClipboardContent doesn't fire.
I used the release R1 2017 SP1
How can I fix it?
Thank you