or
<DataTemplate x:Key="ReadRowDetailsTemplate"> <Grid HorizontalAlignment="Center"> <Grid.RowDefinitions> <RowDefinition Height="Auto" /> <RowDefinition Height="Auto" /> </Grid.RowDefinitions> <Label Content="Alarms for this Read:" FontSize="14" FontWeight="Bold" Grid.Column="0" Grid.Row="0" HorizontalAlignment="Center" /> <DataGrid AlternatingRowBackground="{DynamicResource AlternatingRowBackground}" AutoGenerateColumns="False" CanUserResizeColumns="True" CanUserSortColumns="False" FontSize="14" FontWeight="Bold" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center" IsReadOnly="True" ItemsSource="{Binding Path=Alarms, Mode=TwoWay}" Margin="5" Name="AlarmsGrid" ScrollViewer.CanContentScroll="True" ScrollViewer.HorizontalScrollBarVisibility="Auto" ScrollViewer.VerticalScrollBarVisibility="Auto" SelectionChanged="AlarmsGrid_SelectionChanged" SelectionMode="Single" SelectionUnit="FullRow" VerticalAlignment="Top"> <DataGrid.Columns> <DataGridTextColumn Binding="{Binding Path=AlarmClass}" Header="Alarm Class" /> <DataGridTextColumn Binding="{Binding Path=AlarmTime, Converter={StaticResource DateConverter}}" Header="Time" Width="150" /> <DataGridTextColumn Binding="{Binding Path=ListName}" Header="Source" /> <DataGridTextColumn Binding="{Binding Path=AlarmStatus}" Header="Alarm Status"/> <DataGridTextColumn Binding="{Binding Path=AlarmRejectedReason}" Header="Reason" /> </DataGrid.Columns> </DataGrid> </Grid> </DataTemplate>This is all working, but the DataGrid remains empty after the RowDetails are displayed. What am I missing to make this work?
Tony
I sent a support ticket to the telerik admins asking if there were any API methods to determine if the caret is at the start and end of a line.
They responded with a solution so I thought I should share it with everyone else.
Is Caret at Line Start
public static bool IsCaretAtLineStart(RadDocument document){ DocumentPosition endLinePosition = new DocumentPosition(document.CaretPosition); endLinePosition.MoveToCurrentLineStart(); if (document.CaretPosition == endLinePosition) { return true; } return false;}
Is Caret at Line End
public static bool IsCaretAtLineEnd(RadDocument document){ DocumentPosition endLinePosition = new DocumentPosition(document.CaretPosition); endLinePosition.MoveToCurrentLineEnd(); if (document.CaretPosition == endLinePosition) { return true; } return false;}
I hope this helps you as it did myself.
Thanks,
Rob
Hi, I'm trying to use the RadMaskedNumericInput as follows;<telerik:RadMaskedNumericInputGrid.Row="6"Grid.Column="1"Value="{Binding Mileage}"EmptyContent="kilometer"FormatString="D"Mask="d"IsClearButtonVisible="False"VerticalAlignment="Center"VerticalContentAlignment="Center"/>
<telerik:RadGridView x:Name="myListView" IsReadOnly="{Binding Path=pending, Converter={StaticResource booleanToInverseConv}}"> <telerik:RadGridView.Columns> <telerik:GridViewColumn Header="" IsFilterable="False" HeaderCellStyle="{StaticResource estiloDaColuna}"> <telerik:GridViewColumn.CellTemplate> <DataTemplate> <Button Style="{DynamicResource ImageButtonStyle}" Tag="{Binding Path=id}" x:Name="btnRemoveProduto" Width="20" Click="removeProduto_Click" Height="20"> <Image Source="..\..\..\Icons\delete_red.png" Stretch="Fill" VerticalAlignment="Top" HorizontalAlignment="Left" /> </Button> </DataTemplate> </telerik:GridViewColumn.CellTemplate> </telerik:GridViewColumn> </telerik:RadGridView.Columns></telerik:RadGridView><telerik:GridViewDataColumn IsFilterable="False" IsReadOnly="True" Header="Desconto 2" DataMemberBinding="{Binding desconto2}" DataFormatString="{}{0:N2}%" Width="90" HeaderCellStyle="{StaticResource estiloDaColuna}" FooterCellStyle="{StaticResource GridViewCellStyleLeft}"> <telerik:GridViewDataColumn.Footer> <StackPanel> <Label Content="Ola"></Label> <Label Content="{Binding Path=Descontos}"></Label> </StackPanel> </telerik:GridViewDataColumn.Footer>When I insert a large jpeg into the richtextbox, the editor chops off the right side of the image to fit into the richtextbox without a horizontal scrollbar. What I need is a way to make the richtextbox expands to fit the image.
<telerik:RadRichTextBox HorizontalAlignment="Stretch" LayoutMode="Flow" x:Name="editor" AllowDrop="True" Drop="editor_Drop" ShowComments="False" BorderBrush="Transparent" BorderThickness="0" IsSelectionMiniToolBarEnabled="False" IsContextMenuEnabled="True" IsInHeaderFooterEditMode="False" DocumentPresentationChanged="EditorDocumentContentChanged" LostFocus="editor_LostFocus" SizeChanged="editor_SizeChanged" HorizontalScrollBarVisibility="Disabled"></telerik:RadRichTextBox>
private void editor_SizeChanged(object sender, SizeChangedEventArgs e)
{
this.editor.UpdateEditorLayout();
}