I have an AutoCompleteBox defined like this:
<
telerik:RadAutoCompleteBox
Grid.Row
=
"4"
Grid.Column
=
"1"
HorizontalAlignment
=
"Stretch"
VerticalAlignment
=
"Stretch"
Margin
=
"0,3,6,3"
WatermarkContent
=
"Interviewer's name..."
x:Name
=
"acb_Interviewer"
TextSearchMode
=
"Contains"
AutoCompleteMode
=
"Suggest"
SelectionMode
=
"Single"
DropDownItemTemplate
=
"{StaticResource RoomInterviewerSearchAutoComplete}"
BorderBrush
=
"#FF25A0DA"
BorderThickness
=
"1"
SelectionChanged
=
"Acb_Interviewer_OnSelectionChanged"
/>
<
DataTemplate
x:Key
=
"RoomInterviewerSearchAutoComplete"
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding}"
Style
=
"{StaticResource AutoCompleteStyle}"
/>
</
StackPanel
>
</
DataTemplate
>
The ItemSource is set to a List<string>.
I then try something like this but acb_Interviewer.SelectedItem remains null and only the watermark is visible in the control.
string
interviewerName = dbContext.Users.First(u => u.Id == interview.PrimaryUserId).FullName;
acb_Interviewer.SelectedItem = interviewerName;
What am I doing wrong?
Hello!
I have a question about the RadContextMenu. I created my class DataGridView this class inherited from RadGridView. Look this:
public class DataGridView : RadGridView
{
public DataGridView()
{
// create menu
var contextMenu = new RadContextMenu();
RadMenuItem item = new RadMenuItem();
item.Header = "Hello";
contextMenu.Items.Add(item);
contextMenu.Opened += ContextMenu_Opened;
//add something that we can use to get the data grid on context menu events
contextMenu.ItemClick += ContextMenu_ItemClick;
contextMenu.Opening += ContextMenu_Opening;
// set menu Theme
StyleManager.SetTheme(contextMenu, StyleManager.GetTheme(this));
RadContextMenu.SetContextMenu(this, contextMenu);
}
}
I'm having a problem adding CartesianGridLineAnnotation to series of square cartesian plots. I have four square charts, each going from x to -x in each axis with 0,0 in the middle. I want to add a dark gridline to the 0, 0 point and CartesianGridLineAnnotation looked like the perfect thing for this. I added the following code :
<
telerik:RadCartesianChart.Annotations
>
<
telerik:CartesianGridLineAnnotation
Axis
=
"{Binding AxisX}"
Value
=
"0"
/>
<
telerik:CartesianGridLineAnnotation
Axis
=
"{Binding AxisY}"
Value
=
"0"
/>
</
telerik:RadCartesianChart.Annotations
>
However when I view my charts the annotation appears 1 pixel left of the 0 value on the horizontal axis and 1 pixel above the 0 value on the vertical axis. This is true for the first two charts, the second two the vertical axis line seems to be in the perfect position yet they are being drawn with the exact same code.
Whenever the window size of the app is changed the charts are resized to maintain a square charting area. I notice as I resize the charts the annotations move from being one side of the 0 value, to being on the 0 value, then being the other side of the 0 value.
I am currently using an older version of the Telerik dlls (2013.3.1204.40), is there a fix/workaround that will ensure that the annotation lines are drawn exactly on the specified value?
I've attached a picture of the four charts in question on their initial display. You can see that the black annotations do not line up with the gray grid lines.
Thanks for the help.
Hi folks.
My client had an exception, and I have no idea how to reproduce it.
Do you have any idea what could cause it?
I'm using telerik for wpf version 2015.2.728.40.
Thanks a lot!
Exception:
System.InvalidOperationException: Coleção foi modificada; talvez a operação de enumeração não seja executada.
em System.Collections.Hashtable.HashtableEnumerator.MoveNext()
em Telerik.Windows.Controls.GridView.PropertyMap.Initialize()
em Telerik.Windows.Controls.GridView.PropertyMap.SetReference(Object key, Object value)
em Telerik.Windows.Controls.GridView.GridViewPropertyUpdater.GetPropertyUpdateMap(DependencyObject d)
em Telerik.Windows.Controls.GridView.GridViewPropertyUpdater.UpdateProperty(DependencyObject d, DependencyProperty p)
em Telerik.Windows.Controls.GridView.GridViewRowItem.OnApplyTemplate()
em Telerik.Windows.Controls.GridView.GridViewRow.OnApplyTemplate()
em System.Windows.FrameworkElement.ApplyTemplate()
em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
em System.Windows.UIElement.Measure(Size availableSize)
em Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.NestedLayoutStrategy.MeasureChild(UIElement child, Size layoutSlotSize, Int32 i)
em Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.NestedLayoutStrategy.MeasureOverride(Size constraint)
em Telerik.Windows.Controls.GridView.GridViewVirtualizingPanel.MeasureOverride(Size availableSize)
em System.Windows.FrameworkElement.MeasureCore(Size availableSize)
em System.Windows.UIElement.Measure(Size availableSize)
em System.Windows.ContextLayoutManager.UpdateLayout()
em System.Windows.ContextLayoutManager.UpdateLayoutCallback(Object arg)
em System.Windows.Media.MediaContext.InvokeOnRenderCallback.DoWork()
em System.Windows.Media.MediaContext.FireInvokeOnRenderCallbacks()
em System.Windows.Media.MediaContext.RenderMessageHandlerCore(Object resizedCompositionTarget)
em System.Windows.Media.MediaContext.RenderMessageHandler(Object resizedCompositionTarget)
em System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
em MS.Internal.Threading.ExceptionFilterHelper.TryCatchWhen(Object source, Delegate method, Object args, Int32 numArgs, Delegate catchHandler)
<
Style
TargetType
=
"telerik:GridViewRow"
BasedOn
=
"{StaticResource {x:Type telerik:GridViewRow}}"
>
<
Setter
Property
=
"Background"
Value
=
"LightGray"
/>
<
Style.Triggers
>
<
Trigger
Property
=
"IsSelected"
Value
=
"True"
>
<
Setter
Property
=
"Background"
Value
=
"CornflowerBlue"
/>
<
Setter
Property
=
"Foreground"
Value
=
"White"
/>
</
Trigger
>
<
Trigger
Property
=
"IsMouseOver"
Value
=
"True"
>
<
Setter
Property
=
"Background"
Value
=
"LightBlue"
/>
</
Trigger
>
</
Style.Triggers
>
</
Style
>
<
Setter
Property
=
"Background"
Value
=
"CornflowerBlue"
/>
<telerik:RadCartesianChart x:Name="cartesianChart">
<telerik:RadCartesianChart.Annotations>
<telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=verticalAxis}"
Value="6"
Stroke="Red"
StrokeThickness="1"/>
<telerik:CartesianGridLineAnnotation Axis="{Binding ElementName=horizontalAxis}"
Value="2.8"
Stroke="Blue"
StrokeThickness="1"/>
</telerik:RadCartesianChart.Annotations>
<telerik:RadCartesianChart.Series>
<telerik:ScatterPointSeries>
<telerik:ScatterPointSeries.DataPoints>
<telerik:ScatterDataPoint XValue="1" YValue="5"/>
<telerik:ScatterDataPoint XValue="3" YValue="2"/>
<telerik:ScatterDataPoint XValue="4" YValue="7"/>
</telerik:ScatterPointSeries.DataPoints>
</telerik:ScatterPointSeries>
</telerik:RadCartesianChart.Series>
<telerik:RadCartesianChart.VerticalAxis>
<telerik:LinearAxis x:Name="verticalAxis"/>
</telerik:RadCartesianChart.VerticalAxis>
<telerik:RadCartesianChart.HorizontalAxis>
<telerik:LinearAxis x:Name="horizontalAxis"/>
</telerik:RadCartesianChart.HorizontalAxis>
</telerik:RadCartesianChart>
</telerik:RadCartesianChart>
Hi guys,
I use the RadGridView marginally, with a dynamic resizing of the cells height (with ctrl + mouse wheel), like this :
http://image.noelshack.com/fichiers/2015/47/1447859201-5988-noelpush.png
And I would like to get in my ViewModel the index of the row on the top and bottom of the view (Tstamp 23.285 (top) and 27.569 on my screenshot for the situation from the left).
I tried to use the ScrollPositionIndicatorTemplate but I would like a real time mode (if possible), I don't know how I can send the value to my ViewModel, and it is not very accurate anyway...
And I tried to use the ScrollChanged event (with a ScrollChangedEventArg parameter) sends wrong values. I can't use the VerticalOffset received, because it doesn't corresponds to the reality. I'm forced to go top of the RadGridView and scroll slowly all my GridView if I want receive a correct VerticalOffset (this technique updates virtualized values visibly). Can we refresh manually the "scroll values" after a modification of the height of the cells ?
Or is there a function that directly gives me these rows ?
I hope to have correctly explained the problem. Thanks for your help!
Regards.
System.Windows.Data Error: 40 : BindingExpression path error: 'ActionColumn' property not found on 'object' ''CommunicationLogAcco_4549BD8698DC45DB0CECE67D05EB3039BC10A8BFF12C4F445B3229782B933388' (HashCode=36213804)'. BindingExpression:Path=ActionColumn; DataItem='CommunicationLogAcco_4549BD8698DC45DB0CECE67D05EB3039BC10A8BFF12C4F445B3229782B933388' (HashCode=36213804); target element is 'GridViewCell' (Name=''); target property is 'ValueChangedListener' (type 'Object')<
br
>System.Windows.Data Error: 40 : BindingExpression path error: 'ActionColumn' property not found on 'object' ''CommunicationLogAcco_4549BD8698DC45DB0CECE67D05EB3039BC10A8BFF12C4F445B3229782B933388' (HashCode=36213804)'. BindingExpression:Path=ActionColumn; DataItem='CommunicationLogAcco_4549BD8698DC45DB0CECE67D05EB3039BC10A8BFF12C4F445B3229782B933388' (HashCode=36213804); target element is 'ValueSetter' (Name=''); target property is 'Value' (type 'Object')
Hello,
Using RadCartesianChart with three LineSeries as below, ItemsSource bound to three members of ObservableCollection<prodnMonthly>. Charts display nicely with initial LinearAxis, but when axes are programmatically changed to LogarithmicAxis, data disappears and no vertical axis values are shown. Horizontal axis values are displayed correctly throughout.
Guidance would be appreciated!
Regards,
Bob
<telerik:RadCartesianChart Grid.Row="2" x:Name="ProdnChart" Margin="10" Background="White"
Visibility="{Binding IsSelectedEntityProductionData, Converter={StaticResource BoolToVisibilityConverter}}">
<telerik:RadCartesianChart.HorizontalAxis >
<telerik:DateTimeContinuousAxis x:Name="ProdnChartHorAxis" LabelFitMode="Rotate" LastLabelVisibility="Clip" LabelFormat="MMM-yy"
Minimum="{Binding ElementName=ProdnTimeBar, Path=SelectionStart}" Maximum="{Binding ElementName=ProdnTimeBar, Path=SelectionEnd}"
MajorStepUnit="Month" />
</telerik:RadCartesianChart.HorizontalAxis>
<!-- Tooltip -->
<telerik:RadCartesianChart.Behaviors>
<telerik:ChartTooltipBehavior Placement="Top" VerticalOffset="0" />
</telerik:RadCartesianChart.Behaviors>
<telerik:RadCartesianChart.TooltipTemplate>
<DataTemplate>
<Border Background="White" BorderBrush="Black" BorderThickness="1" CornerRadius="2">
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<Border Grid.Row="0" Grid.ColumnSpan="3" BorderBrush="Black" BorderThickness="0,0,0,1" >
<TextBlock Text="{Binding DataItem.ProductionDate, StringFormat='yyyy MMMMM'}" FontWeight="Black" HorizontalAlignment="Center" Margin="0,3,0,3" />
</Border>
<TextBlock Grid.Row="1" Grid.Column="0" Text="Oil:" Margin="5,3,5,0"/>
<TextBlock Grid.Row="1" Grid.Column="1" Text="{Binding DataItem.Oil, StringFormat='#,0'}" HorizontalAlignment="Right" Margin="5,3,3,0" />
<TextBlock Grid.Row="1" Grid.Column="2" Text="BBL" Margin="0,3,5,0"/>
<TextBlock Grid.Row="2" Grid.Column="0" Text="Gas:" Margin="5,0,5,0"/>
<TextBlock Grid.Row="2" Grid.Column="1" Text="{Binding DataItem.Gas, StringFormat='#,0'}" HorizontalAlignment="Right" Margin="5,0,3,0" />
<TextBlock Grid.Row="2" Grid.Column="2" Text="MCF" Margin="0,0,5,0"/>
<TextBlock Grid.Row="3" Grid.Column="0" Text="Water:" Margin="5,0,5,3"/>
<TextBlock Grid.Row="3" Grid.Column="1" Text="{Binding DataItem.Water, StringFormat='#,0'}" HorizontalAlignment="Right" Margin="5,0,3,3" />
<TextBlock Grid.Row="3" Grid.Column="2" Text="BBL" Margin="0,0,5,3"/>
</Grid>
</Border>
</DataTemplate>
</telerik:RadCartesianChart.TooltipTemplate>
<telerik:RadCartesianChart.Grid>
<telerik:CartesianChartGrid MajorLinesVisibility="XY" />
</telerik:RadCartesianChart.Grid>
<telerik:RadCartesianChart.Annotations >
<telerik:CartesianGridLineAnnotation
Axis="{Binding ElementName=ProdnChart, Path=HorizontalAxis}"
Value="01/01/1960" Stroke="Tomato" StrokeThickness="3"
ToolTipService.ToolTip="Well test Jan 1960"/>
</telerik:RadCartesianChart.Annotations>
<telerik:RadCartesianChart.Series >
<!-- Gas -->
<telerik:LineSeries x:Name="GasSeries" Stroke="Red" StrokeThickness="1"
ItemsSource="{Binding prodnMonthlies}" ValueBinding="Gas"
CategoryBinding="ProductionDate"
VerticalAxis="{Binding SelectedVerticalAxisOption.GasAxis}"
>
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Height="4" Width="4" Fill="Red" />
</DataTemplate>
</telerik:LineSeries.PointTemplate>
<telerik:LineSeries.LegendSettings>
<telerik:SeriesLegendSettings Title="Gas" />
</telerik:LineSeries.LegendSettings>
</telerik:LineSeries>
<!-- Oil -->
<telerik:LineSeries x:Name="OilSeries" Stroke="DarkGreen" StrokeThickness="1"
ItemsSource="{Binding prodnMonthlies}" ValueBinding="Oil"
CategoryBinding="ProductionDate"
VerticalAxis="{Binding SelectedVerticalAxisOption.OilAxis}"
>
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Height="4" Width="4" Fill="DarkGreen" />
</DataTemplate>
</telerik:LineSeries.PointTemplate>
<telerik:LineSeries.LegendSettings>
<telerik:SeriesLegendSettings Title="DarkGreen" />
</telerik:LineSeries.LegendSettings>
</telerik:LineSeries>
<!-- Water -->
<telerik:LineSeries x:Name="WaterSeries" Stroke="Blue" StrokeThickness="0.7"
ItemsSource="{Binding prodnMonthlies}" ValueBinding="Water"
CategoryBinding="ProductionDate"
VerticalAxis="{Binding SelectedVerticalAxisOption.WaterAxis}"
>
<telerik:LineSeries.PointTemplate>
<DataTemplate>
<Ellipse Height="3" Width="3" Fill="Blue" />
</DataTemplate>
</telerik:LineSeries.PointTemplate>
<telerik:LineSeries.LegendSettings>
<telerik:SeriesLegendSettings Title="Blue" />
</telerik:LineSeries.LegendSettings>
</telerik:LineSeries>
</telerik:RadCartesianChart.Series>
<!-- Chart Context Menu -->
<telerik:RadContextMenu.ContextMenu>
<telerik:RadContextMenu>
<!-- Vertical Axis -->
<telerik:RadMenuItem Header="Axis">
<telerik:RadMenuItem Header="Linear"
IsCheckable="False" IsChecked="{Binding SelectedVerticalAxisOption.Label, Converter={StaticResource StringEqualityToBoolConverter}, ConverterParameter='Linear'}"
ToolTipService.ToolTip="Click for a linear vertical axis"
Command="{Binding ChartContextMenuAxisCommand}" CommandParameter="Linear"/>
<telerik:RadMenuItem Header="Logarithmic"
IsCheckable="False" IsChecked="{Binding SelectedVerticalAxisOption.Label, Converter={StaticResource StringEqualityToBoolConverter}, ConverterParameter='Logarithmic'}"
ToolTipService.ToolTip="Click for a linear vertical axis"
Command="{Binding ChartContextMenuAxisCommand}" CommandParameter="Logarithmic"/>
</telerik:RadMenuItem>
</telerik:RadContextMenu>
</telerik:RadContextMenu.ContextMenu>
</telerik:RadCartesianChart>
public class prodnMonthly : INotifyPropertyChanged
{
private string _entity;
private DateTime _productionDate;
private int _gas;
private int _oil;
private int _water;
private int _bOE;
private double _percentWater;
private double _ratioGasOil;
private int _monthsInProduction;
private double? _oilDecline;
private double? _gasDecline;
public string Entity
{
get
{
return _entity;
}
set
{
if (value != _entity)
{
_entity = value;
RaisePropertyChanged("Entity");
}
}
}
public DateTime ProductionDate
{
get
{
return _productionDate;
}
set
{
if (value != _productionDate)
{
_productionDate = value;
RaisePropertyChanged("ProductionDate");
}
}
}
public int Gas
{
get
{
return _gas;
}
set
{
if (value != _gas)
{
_gas = value;
RaisePropertyChanged("Gas");
}
}
}
public int Oil
{
get
{
return _oil;
}
set
{
if (value != _oil)
{
_oil = value;
RaisePropertyChanged("Oil");
}
}
}
public int Water
{
get
{
return _water;
}
set
{
if (value != _water)
{
_water = value;
RaisePropertyChanged("Water");
}
}
}
public int BOE
{
get
{
return _bOE;
}
set
{
if (value != _bOE)
{
_bOE = value;
RaisePropertyChanged("BOE");
}
}
}
public double PercentWater
{
get
{
return _percentWater;
}
set
{
if (value != _percentWater)
{
_percentWater = value;
RaisePropertyChanged("PercentWater");
}
}
}
public double RatioGasOil
{
get
{
return _ratioGasOil;
}
set
{
if (value != _ratioGasOil)
{
_ratioGasOil = value;
RaisePropertyChanged("RatioGasOil");
}
}
}
public int MonthsInProduction
{
get
{
return _monthsInProduction;
}
set
{
if (value != _monthsInProduction)
{
_monthsInProduction = value;
RaisePropertyChanged("MonthsInProduction");
}
}
}
public double? OilDecline
{
get
{
return _oilDecline;
}
set
{
if (value != _oilDecline)
{
_oilDecline = value;
RaisePropertyChanged("OilDecline");
}
}
}
public double? GasDecline
{
get
{
return _gasDecline;
}
set
{
if (value != _gasDecline)
{
_gasDecline = value;
RaisePropertyChanged("GasDecline");
}
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string _name)
{
PropertyChangedEventHandler handler = PropertyChanged;
if (handler != null)
{
handler(this, new PropertyChangedEventArgs(_name));
}
}
public prodnMonthly(string _entity, DateTime _pdate, int _oil, int _gas, int _water, int _boe,
double _ratioGasOil, double _percentWater, int _monthsInProduction)
{
Entity = _entity;
ProductionDate = _pdate;
Oil = _oil;
Gas = _gas;
Water = _water;
BOE = _boe;
RatioGasOil = _ratioGasOil;
PercentWater = _percentWater;
MonthsInProduction = _monthsInProduction;
OilDecline = null;
GasDecline = null;
}
}
Hi,
To use the CaretFactory on the radtextbox as suggested as workaround by a telerik developer ( http://www.telerik.com/forums/automationproperties-not-reqognized-by-narrator ) I needed to update my dll's to version 2015.2.728.45.
This update broke my drag drop support in the application. When I use a touch screen to drag drop nothing is happining, before the update everything whas fine, tried to get the version without the update and the drag drop is working again.
Any idea how to fix this functionality? good drag drop support is one of the main reasons we are using telerik.