Hello
I need to give the numeric up down IsReadOnly property, and the user can't input data.
IsEditableProperty =False the user can insert data in the keys up/down arrows,page up/down keys.
How to implement this scenario?
Best regards
Ehud.
var connectorsToBeRemoved = shape.Connectors.Where(x => x.Name != "Auto").ToList();foreach (var connector in connectorsToBeRemoved){ shape.Connectors.Remove(connector);}private static void WorkaroundTelerik2015Q1(RadDiagramShape shape){ var fakeConnector = new RadDiagramConnector {Offset = shape.Connectors[0].Offset, Name = "Fake", IsEnabled = false,}; shape.Connectors.Add(fakeConnector); Canvas.SetZIndex(fakeConnector, -999);}
I am trying to display data vertically using wpf telerik RadGrid, which needs to be exported to excel in the same layout format. I have set LayoutTransform property of the telerik wpf radgrid to an angle so as to achieve this, but have run into below issues:
export the data with vertical layout intact,
grid lines disappeared after applying rotation style to the grid cells,
unable to hide the row selection highlight,
horizontal and vertical scrolls are not aligned correctly
Can someone please help me with these? I am also wondering, if is it preferable to use PivotGrid for such layout?
Any suggestions would be of great help!
Thanks in advance, Lax
<!-- Styles for the telerik RadComboBox --> <Style x:Key="RadComboBoxStyle" TargetType="{x:Type telerik:RadComboBox}"> <Setter Property="FontFamily" Value="Segoe UI" /> <Setter Property="FocusVisualStyle" Value="{x:Null}"/> <Setter Property="FontSize" Value="12"/> <Setter Property="Padding" Value="5,0,5,0"/> <Setter Property="Foreground" Value="#1A1A1A"/> <Setter Property="Background" Value="Transparent"/> <Setter Property="MinWidth" Value="140" /> <!--<Setter Property="DropDownWidth" Value="*" />--> <Setter Property="MinHeight" Value="24"/> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type telerik:RadComboBox}"> <Border x:Name="OuterBd" CornerRadius="4" Padding="1" BorderBrush="Black" BorderThickness="0"> <Border.Effect> <DropShadowEffect Direction="270" ShadowDepth="0.5" BlurRadius="0.5" Opacity="0.25"/> </Border.Effect> <Border x:Name="InnerBd" Background="{StaticResource BaseInnerBorderBrush}" BorderThickness="0" CornerRadius="3" Padding="1"> <Border Background="{TemplateBinding Background}" BorderThickness="0" CornerRadius="2"> <Grid> <Grid.ColumnDefinitions> <ColumnDefinition Width="*"/> <ColumnDefinition MinWidth="{DynamicResource {x:Static SystemParameters.VerticalScrollBarWidthKey}}" Width="0"/> </Grid.ColumnDefinitions> </Grid> </Border> </Border> </Border> <ControlTemplate.Triggers> <Trigger Property="IsFocused" Value="true"> <Setter Property="BorderBrush" Value="{StaticResource FocusedBrush}" /> </Trigger> <Trigger Property="IsMouseOver" Value="True"> <Setter Property="Background" Value="{StaticResource BaseButtonMouseOverBrush}"/> </Trigger> <Trigger Property="IsMouseOver" Value="False"> <Setter Property="Background" Value="Transparent"/> <Setter Property="BorderBrush" Value="Black" /> <Setter Property="BorderThickness" Value="1" /> </Trigger> <Trigger Property="IsDropDownOpen" Value="true"> <Setter Property="Background" Value="{StaticResource PressedBrush}"/> <Setter Property="BorderBrush" Value="#BCBCBC"/> <Setter TargetName="OuterBd" Property="Effect" Value="{x:Null}"/> <Setter Property="Foreground" Value="#FFFFFF"/> </Trigger> <Trigger Property="ToggleButton.IsChecked" Value="true"/> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Background" Value="#E6E7E8"/> <Setter Property="BorderBrush" Value="#A7A9AC"/> <Setter TargetName="OuterBd" Property="Effect" Value="{x:Null}"/> <Setter TargetName="InnerBd" Property="Background" Value="#E6E7E8"/> <Setter Property="Foreground" Value="#6D6E71"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style> <!-- Styles for the telerik RadComboBoxItem --> <Style TargetType="{x:Type telerik:RadComboBoxItem}"> <Setter Property="Padding" Value="5,0,5,0"/> <Setter Property="Foreground" Value="#1A1A1A"/> <Setter Property="Background" Value="#FFF2F2F2"/> <Setter Property="MinWidth" Value="140" /> <Setter Property="MinHeight" Value="24"/> <Setter Property="BorderThickness" Value="0,0,0,0" /> <!--<Setter Property="BorderBrush" Value="#6D6E71"/>--> <Setter Property="HorizontalContentAlignment" Value="Left" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type telerik:RadComboBoxItem}"> <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true"> <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"> </ContentPresenter> </Border> <ControlTemplate.Triggers> <Trigger Property="IsHighlighted" Value="true"> <Setter Property="Foreground" Value="White" /> <Setter Property="Background" Value="#499ACF" /> </Trigger> <Trigger Property="IsHighlighted" Value="False"> <Setter Property="Background" Value="#F2F2F2" /> </Trigger> <Trigger Property="IsEnabled" Value="false"> <Setter Property="Foreground" Value="#939598"/> <Setter Property="Background" Value="#FFF4F4F4"/> </Trigger> <Trigger Property="IsKeyboardFocusWithin" Value="true"> <Setter Property="Foreground" Value="Black"/> </Trigger> </ControlTemplate.Triggers> </ControlTemplate> </Setter.Value> </Setter> </Style><Grid> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="*" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Border Style="{StaticResource DialogContentBorderStyle}" Grid.Row="1"> <DockPanel Margin="16,10,0,0"> <Grid Margin="0,10,0,0"> <Grid.RowDefinitions> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> <RowDefinition Height="Auto"/> </Grid.RowDefinitions> <Grid.ColumnDefinitions> <ColumnDefinition Width="Auto" SharedSizeGroup="LabelColumn" MinWidth="60" /> <ColumnDefinition Width="*" /> <ColumnDefinition Width="70" /> </Grid.ColumnDefinitions> <TextBlock Grid.Row="0" Grid.Column="0" Text="Select Item" Style="{StaticResource LabelTextBlock}" CoreExt:TextBoxExtension.IsRequired="True" Visibility="{Binding Request, Converter={StaticResource BoolVisibilityConverter}}"/> <telerik:RadComboBox Name="RadComboBox" Grid.Row="0" Grid.Column="1" Margin="{StaticResource ModalRowMargin}" ItemsSource="{Binding Available}"SelectedItem="{Binding Selected, UpdateSourceTrigger=PropertyChanged, ValidatesOnDataErrors=True, Mode=TwoWay}" Visibility="{Binding RequestCase, Converter={StaticResource BoolVisibilityConverter}}"TextSearchMode="Contains" Text="{Binding Text, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}" IsFilteringEnabled="True" OpenDropDownOnFocus="True" Style="{StaticResource RadComboBoxStyle}" IsEditable="True" behaviors:RadComboBoxBehaviors.OverrideRadDefaults="True" StaysOpenOnEdit="True" > <telerik:RadComboBox.ItemContainerStyle> <Style TargetType="{x:Type telerik:RadComboBoxItem}" BasedOn="{StaticResource {x:Type telerik:RadComboBoxItem}}"> <Style.Triggers> <DataTrigger Binding="{Binding CaseId}" Value="-1"> <Setter Property="IsEnabled" Value="False" /> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type telerik:RadComboBoxItem}"> <Border Background="#F4F4F4"> <Separator HorizontalAlignment="Stretch" Foreground="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}" Height="1"/> </Border> </ControlTemplate> </Setter.Value> </Setter> </DataTrigger> </Style.Triggers> </Style> </telerik:RadComboBox.ItemContainerStyle> <telerik:RadComboBox.ItemTemplate> <DataTemplate> <TextBlock TextTrimming="WordEllipsis" ToolTip="{Binding}" Text="{Binding}" MaxWidth="250"></TextBlock> </DataTemplate> </telerik:RadComboBox.ItemTemplate> </telerik:RadComboBox> </Grid> </DockPanel> </Border></Grid>