A pair of RadTimePickers I have for selecting the beginning and end of a shift are displaying the timeview incorrectly after being enabled and having the starttime and endtime values set. They both show every slot from 12AM to 11:45PM, but starting with 12AM selecting a slot displays the value that SHOULD be seen, 8:30AM in this case, and continues for each subsequent slot in the same manner until the endtime slot, whose correct value is 5:15PM at the 8:45AM slot on the selection view. When the binding event is called a second time, the timeviews for both RTPs are correctly shown, going from 8:30AM to 5:15PM. HTML markup of the RTPs in question as follows, as well as the code-behind for the binding event.
//HTML//
<
telerik:RadTimePicker
ID
=
"tpStartTime"
runat
=
"server"
EnableTyping
=
"false"
TimeView-Columns
=
"4"
TimeView-Interval
=
"00:15:00"
Enabled
=
"false"
></
telerik:RadTimePicker
>
<
telerik:RadTimePicker
ID
=
"tpEndTime"
runat
=
"server"
EnableTyping
=
"false"
TimeView-Columns
=
"4"
TimeView-Interval
=
"00:15:00"
Enabled
=
"false"
></
telerik:RadTimePicker
>
//C#//
protected void dpOriginalDate_SelectedDateChanged(object sender, Telerik.Web.UI.Calendar.SelectedDateChangedEventArgs e)
{
DateTime[] shift = getShift((DateTime)dpOriginalDate.SelectedDate);
tpStartTime.Enabled = tpEndTime.Enabled = true;
tpStartTime.TimeView.StartTime = shift[0].TimeOfDay;
tpStartTime.TimeView.EndTime = shift[1].TimeOfDay;
tpEndTime.TimeView.StartTime = shift[0].AddMinutes(15).TimeOfDay;
tpEndTime.TimeView.EndTime = shift[1].AddMinutes(15).TimeOfDay;
}
Page_Load contains Page.DataBind(); which appears to be the cause. Do I have to do without it or is there a workaround?
However, I am not able to use the GetProperty method for control specific properties, i.e. "ItemState" on a RadTileViewItem. I am able to find the item and for example draw a highlight around it, but trying to get it's TileState results in a NotSupportedException:
GetProperty of "TileState" is not supported on control type: Custom
What seems strange: If I start the coded ui test builder and pull the crosshair over the TileViewItem, I can see it's TileState property and the correct value. Only the test playback is not able to retrieve it.
Am I missing something important to make the uitest extension working?
I want a button on radribbon to have a dropdown content just like RadRibbonDropDownButton, but i also want to include this button into radiobuttons group. I mean this dropdown button should be toggleable and mutually exclusive with other buttons of the same group.
How could i do this?
Hi,
I would that SendBackward command set Z-Index to penultimate item and not last one.
Moreover SendToBack decreases Z-Index but until to penultimate item.
I would this behavior because, I have ever a rectangle called "MainContainer" that "contains" other rectangles, but actually is only showed as last one under other ones, and it has to ever last one then it has to ever lowest Z-Index.
How can I do this?
Hello,
I have a problem with the horizontal axis of my RadCartesianChar when I change the period of my statistics:
<
telerik:RadCartesianChart
x:Name
=
"Chart"
TrackBallInfoStyle
=
"{StaticResource ResourceKey=TrackBallInfoStyle}"
TrackBallLineStyle
=
"{StaticResource ResourceKey=TransparentTrackLineStyle}"
helpers:ChartViewUtilities.ChartAlignmentGroup
=
"g1"
>
<
telerik:RadCartesianChart.Resources
>
<
DataTemplate
x:Key
=
"NormalTemplate"
>
<
TextBlock
Text
=
"{Binding}"
Padding
=
"2"
/>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"TodayTemplate"
>
<
Border
BorderThickness
=
"1"
BorderBrush
=
"Black"
>
<
TextBlock
Text
=
"{Binding}"
Padding
=
"2"
/>
</
Border
>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"HolidayTemplate"
>
<
TextBlock
Text
=
"{Binding}"
FontWeight
=
"Bold"
Foreground
=
"Red"
Padding
=
"2"
/>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"WeekendTemplate"
>
<
TextBlock
Text
=
"{Binding}"
FontWeight
=
"Bold"
Foreground
=
"Black"
Padding
=
"2"
/>
</
DataTemplate
>
<
selectors:DateTypeTemplateSelector
x:Key
=
"Selector"
NormalTemplate
=
"{StaticResource NormalTemplate}"
TodayTemplate
=
"{StaticResource TodayTemplate}"
HolidayTemplate
=
"{StaticResource HolidayTemplate}"
WeekendTemplate
=
"{StaticResource WeekendTemplate}"
/>
</
telerik:RadCartesianChart.Resources
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartTrackBallBehavior
ShowTrackInfo
=
"True"
helpers:ChartViewUtilities.ShouldPositionTrackBallCloseToDataPoint
=
"True"
helpers:ChartViewUtilities.TrackedPointFill
=
"{StaticResource IsMouseOverNeutralValueBrush}"
helpers:ChartViewUtilities.TrackBallGroup
=
"g1"
TrackInfoUpdated
=
"ChartTrackBallBehavior_TrackInfoUpdated"
/>
</
telerik:RadCartesianChart.Behaviors
>
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"Y"
/>
</
telerik:RadCartesianChart.Grid
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
LabelFormat
=
"dd"
LabelTemplateSelector
=
"{StaticResource Selector}"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
SmartLabelsMode
=
"SmartStepAndRange"
MajorStep
=
"1"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:BarSeries
ItemsSource
=
"{Binding SeaDailyStats}"
CategoryBinding
=
"DateAction"
ValueBinding
=
"NbAction"
CombineMode
=
"Stack"
helpers:ChartAnimationUtilities.CartesianAnimation
=
"Rise"
>
<
telerik:BarSeries.TrackBallInfoTemplate
>
<
DataTemplate
>
<
Border
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding DisplayContent, StringFormat='Mise(s) en ligne : {0}'}"
/>
</
StackPanel
>
</
Border
>
</
DataTemplate
>
</
telerik:BarSeries.TrackBallInfoTemplate
>
<
telerik:BarSeries.DefaultVisualStyle
>
<
Style
TargetType
=
"{x:Type Border}"
>
<
Setter
Property
=
"Background"
Value
=
"{StaticResource NeutralValueBrush}"
/>
</
Style
>
</
telerik:BarSeries.DefaultVisualStyle
>
</
telerik:BarSeries
>
<
telerik:BarSeries
ItemsSource
=
"{Binding SeaDailyStats}"
CategoryBinding
=
"DateAction"
ValueBinding
=
"Target"
CombineMode
=
"Stack"
helpers:ChartAnimationUtilities.CartesianAnimation
=
"Rise"
>
<
telerik:BarSeries.TrackBallInfoTemplate
>
<
DataTemplate
/>
</
telerik:BarSeries.TrackBallInfoTemplate
>
<
telerik:BarSeries.DefaultVisualStyle
>
<
Style
TargetType
=
"Border"
>
<
Setter
Property
=
"Background"
Value
=
"{StaticResource BadValueBrush}"
/>
</
Style
>
</
telerik:BarSeries.DefaultVisualStyle
>
</
telerik:BarSeries
>
</
telerik:RadCartesianChart
>
The period is a complete month but I display only the day (dd) on horizontal axis.
The template selector allow me to display differently the type of day (normal, today, week end, holiday).
The first month all is correct but when I change the month, the SelectTemplate method of DateTypeTemplateSelector is not call again. So the template don't change with the new axis value of the month.
But if I display not only the day (dd) but the complete day (dd/MM/yyyy) on LabelFormat all works fine.
So I think that the SelectTemplate method of DateTypeTemplateSelector is call only when the displayed value is different.
But me I need o display only the day (dd).
Can you help me please. Thank you in advance and sorry for my bad English.
Kind regards,
Jonathan
Hello,
I have a problem with the horizontal axis of my RadCartesianChar when I change the period of my statistics:
<
telerik:RadCartesianChart
x:Name
=
"Chart"
TrackBallInfoStyle
=
"{StaticResource ResourceKey=TrackBallInfoStyle}"
TrackBallLineStyle
=
"{StaticResource ResourceKey=TransparentTrackLineStyle}"
helpers:ChartViewUtilities.ChartAlignmentGroup
=
"g1"
>
<
telerik:RadCartesianChart.Resources
>
<
DataTemplate
x:Key
=
"NormalTemplate"
>
<
TextBlock
Text
=
"{Binding}"
Padding
=
"2"
/>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"TodayTemplate"
>
<
Border
BorderThickness
=
"1"
BorderBrush
=
"Black"
>
<
TextBlock
Text
=
"{Binding}"
Padding
=
"2"
/>
</
Border
>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"HolidayTemplate"
>
<
TextBlock
Text
=
"{Binding}"
FontWeight
=
"Bold"
Foreground
=
"Red"
Padding
=
"2"
/>
</
DataTemplate
>
<
DataTemplate
x:Key
=
"WeekendTemplate"
>
<
TextBlock
Text
=
"{Binding}"
FontWeight
=
"Bold"
Foreground
=
"Black"
Padding
=
"2"
/>
</
DataTemplate
>
<
selectors:DateTypeTemplateSelector
x:Key
=
"Selector"
NormalTemplate
=
"{StaticResource NormalTemplate}"
TodayTemplate
=
"{StaticResource TodayTemplate}"
HolidayTemplate
=
"{StaticResource HolidayTemplate}"
WeekendTemplate
=
"{StaticResource WeekendTemplate}"
/>
</
telerik:RadCartesianChart.Resources
>
<
telerik:RadCartesianChart.Behaviors
>
<
telerik:ChartTrackBallBehavior
ShowTrackInfo
=
"True"
helpers:ChartViewUtilities.ShouldPositionTrackBallCloseToDataPoint
=
"True"
helpers:ChartViewUtilities.TrackedPointFill
=
"{StaticResource IsMouseOverNeutralValueBrush}"
helpers:ChartViewUtilities.TrackBallGroup
=
"g1"
TrackInfoUpdated
=
"ChartTrackBallBehavior_TrackInfoUpdated"
/>
</
telerik:RadCartesianChart.Behaviors
>
<
telerik:RadCartesianChart.Grid
>
<
telerik:CartesianChartGrid
MajorLinesVisibility
=
"Y"
/>
</
telerik:RadCartesianChart.Grid
>
<
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:DateTimeCategoricalAxis
LabelFormat
=
"dd"
LabelTemplateSelector
=
"{StaticResource Selector}"
/>
</
telerik:RadCartesianChart.HorizontalAxis
>
<
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:LinearAxis
SmartLabelsMode
=
"SmartStepAndRange"
MajorStep
=
"1"
/>
</
telerik:RadCartesianChart.VerticalAxis
>
<
telerik:BarSeries
ItemsSource
=
"{Binding SeaDailyStats}"
CategoryBinding
=
"DateAction"
ValueBinding
=
"NbAction"
CombineMode
=
"Stack"
helpers:ChartAnimationUtilities.CartesianAnimation
=
"Rise"
>
<
telerik:BarSeries.TrackBallInfoTemplate
>
<
DataTemplate
>
<
Border
>
<
StackPanel
Orientation
=
"Horizontal"
>
<
TextBlock
Text
=
"{Binding DisplayContent, StringFormat='Mise(s) en ligne : {0}'}"
/>
</
StackPanel
>
</
Border
>
</
DataTemplate
>
</
telerik:BarSeries.TrackBallInfoTemplate
>
<
telerik:BarSeries.DefaultVisualStyle
>
<
Style
TargetType
=
"{x:Type Border}"
>
<
Setter
Property
=
"Background"
Value
=
"{StaticResource NeutralValueBrush}"
/>
</
Style
>
</
telerik:BarSeries.DefaultVisualStyle
>
</
telerik:BarSeries
>
<
telerik:BarSeries
ItemsSource
=
"{Binding SeaDailyStats}"
CategoryBinding
=
"DateAction"
ValueBinding
=
"Target"
CombineMode
=
"Stack"
helpers:ChartAnimationUtilities.CartesianAnimation
=
"Rise"
>
<
telerik:BarSeries.TrackBallInfoTemplate
>
<
DataTemplate
/>
</
telerik:BarSeries.TrackBallInfoTemplate
>
<
telerik:BarSeries.DefaultVisualStyle
>
<
Style
TargetType
=
"Border"
>
<
Setter
Property
=
"Background"
Value
=
"{StaticResource BadValueBrush}"
/>
</
Style
>
</
telerik:BarSeries.DefaultVisualStyle
>
</
telerik:BarSeries
>
</
telerik:RadCartesianChart
>
The period is a complete month but I display only the day (dd) on horizontal axis.
The template selector allow me to display differently the type of day (normal, today, week end, holiday).
The first month all is correct but when I change the month, the SelectTemplate method of DateTypeTemplateSelector is not call again. So the template don't change with the new axis value of the month.
But if I display not only the day (dd) but the complete day (dd/MM/yyyy) on LabelFormat all works fine.
So I think that the SelectTemplate method of DateTypeTemplateSelector is call only when the displayed value is different.
But me I need o display only the day (dd).
Can you help me please. Thank you in advance and sorry for my bad English.
Kind regards,
Jonathan
Hello
I have tried a RadDataFilter with RadComboBox as DataTemplate.
Is work's fine, but when i allow muliple Selection, the filter does not work as I expect (Only one value is filtered).
How do I have to make this work?
<
Grid
Margin
=
"20"
>
<
Grid.Resources
>
<
DataTemplate
x:Key
=
"ComboBoxEditor"
>
<
telerik:RadComboBox
SelectedValue
=
"{Binding Value, Mode=TwoWay, FallbackValue=null}"
AllowMultipleSelection
=
"True"
/>
</
DataTemplate
>
<
local:EditorTemplateSelector
x:Key
=
"EditorTemplateSelector"
>
<
local:EditorTemplateSelector.EditorTemplateRules
>
<
local:EditorTemplateRule
PropertyName
=
"MainCategory"
DataTemplate
=
"{StaticResource ComboBoxEditor}"
/>
</
local:EditorTemplateSelector.EditorTemplateRules
>
</
local:EditorTemplateSelector
>
</
Grid.Resources
>
<
telerik:RadDataFilter
x:Name
=
"radDataFilter"
Source
=
"{Binding Items, ElementName=radGridView}"
EditorTemplateSelector
=
"{StaticResource EditorTemplateSelector}"
>
<
telerik:RadGridView
x:Name
=
"radGridView"
Grid.Row
=
"1"
Grid.Column
=
"0"
GroupRenderMode
=
"Nested"
ItemsSource
=
"{Binding M<View}"
IsFilteringAllowed
=
"False"
AutoGenerateColumns
=
"False"
ShowGroupPanel
=
"True"
IsReadOnly
=
"True"
ShowSearchPanel
=
"True"
>
<
telerik:RadGridView.Columns
>
...
</
telerik:RadGridView.Columns
>
</
telerik:RadGridView
>
</
Grid
>
How to implement multi select RadComboBox with checkbox filter?
Thanks in advance for any help
Hi,
Given a RadTreeViewItem, I want to expand all if it's descendants. I receive the first RadTreeViewItem via an attached behavior:
private void OnLoaded(object sender, RoutedEventArgs e)
{
RadTreeViewItem tvi = AssociatedObject;
after doing some checks I call tvi.IsExpanded = True and tvi.IsSelected = True;
This gets my tree opened up to the desired node. Now I want to expand all of it's children so the user doesn't have to open up each branch by hand.
01.
private void ExpandChildren(RadTreeViewItem tvItem)
02.
{
03.
04.
//var container = tvItem.ItemContainerGenerator.IndexFromContainer();
05.
var tvi = tvItem;
06.
foreach (RadTreeViewItem item in tvi.Items)
07.
{
08.
var kid = tvi.ParentTreeView.ContainerFromItemRecursive(item);
09.
kid.IsExpanded = true;
10.
if (kid.HasItems)
11.
ExpandChildren(kid);
12.
}
13.
}
However, this function blows up on line 6 complaining that the item cannot be converted from the value (in my case an app specific class) type to a RadTreeViewItem. I tried using ContainerFromItemRecursive, but it always seems to return null. How to convert a tvi.Items[n] to a RadTreeViewItem that I can mark IsExpanded = true?
This seems like this shouldn't be that hard.
Can someone please point me in the right direction?
Thanks ... Ed
Hi,
I am trying to implement a button in RadGridView column but when clicking the cutton, nothing happens. Here is the actual code:
<telerik:GridViewColumn
Width="Auto">
<telerik:GridViewColumn.CellTemplate>
<DataTemplate>
<telerik:RadButton Content="Content"
Command="{Binding myCommand}">
<telerik:RadButton.Style>
<Style TargetType="{x:Type telerik:RadButton}">
<Style.Setters>
<Setter Property="Visibility" Value="Hidden"/>
</Style.Setters>
<Style.Triggers>
<DataTrigger Binding="{Binding Flag_ID}" Value="FlagStatus">
<Setter Property="Visibility" Value="Visible"/>
</DataTrigger>
</Style.Triggers>
</Style>
</telerik:RadButton.Style>
</telerik:RadButton>
</DataTemplate>
</telerik:GridViewColumn.CellTemplate>
</telerik:GridViewColumn>