or
var treeItem = (RadTreeViewItem)control.ItemContainerGenerator.ContainerFromItem(myVMObject);And I'm using virtualizing
VirtualizingStackPanel.IsVirtualizing="True" VirtualizingStackPanel.VirtualizationMode="Recycling"
2. When sometimes the TreeViewItem is not null, then trying to bring it into view, the previous code no longer works.
ItemsControl control = treeView; control.UpdateLayout(); var treeItem = (RadTreeViewItem)control.ItemContainerGenerator.ContainerFromItem(myVMObject); if (treeItem != null) { treeItem.Focus(); treeItem.IsSelected = true; treeItem.IsExpanded = true;
}
3. By clicking on a node and then switching to other node,
sometimes the last clicked node, even that is selected, not visualy looks like selected,
and the previous one looks like it still selected.
Thanks in advance,
Merav
<telerik:RadTreeView Height="683" Margin="12,34,0,0" Name="ServicesTree" Width="342"
Background="White"
Foreground="Black"
IsLineEnabled="True"
AllowDrop="True"
IsRootLinesEnabled="True" DragEnter="ServicesTree_DragEnter" Drop="ServicesTree_Drop"/>
<telerik1:RadGridView Name="bareDriveCostsListRadGridView" DataContext="{StaticResource bareDriveCostsListViewModelModelViewSource}" ItemsSource="{Binding ValidatesOnDataErrors=True, NotifyOnValidationError=True, ValidatesOnExceptions=True, NotifyOnTargetUpdated=True, NotifyOnSourceUpdated=True}" AutoGenerateColumns="False" CanUserDeleteRows="False" AutoExpandGroups="True" DataLoaded="bareDriveCostsListRadGridView_DataLoaded" SelectionUnit="Cell" IsReadOnly="{Binding Source={StaticResource bareDriveCostsListViewModelViewSource}, Path=CanEdit, Converter={StaticResource NotConverter}}">
<telerik1:GridViewMaskedTextBoxColumn Name="HistoryColumn4" DataFormatString="{}{0:n}" MaskType="Numeric" Mask="n" Header="{Binding Path=HistoryName4}" Background="LightGray" DataMemberBinding="{Binding Path=History4.Cost}" IsReadOnly="True" TextAlignment="Right" IsFilterable="False" IsSortable="False" />and some like this
<telerik1:GridViewMaskedTextBoxColumn Name="BareDriveCostColumn" Header="Bare Drive Cost" DataMemberBinding="{Binding Path=Cost}" DataFormatString="{}{0:n}" TextAlignment="Right" MaskType="Numeric" Mask="n" IsFilterable="False" IsSortable="False" > <telerik1:GridViewMaskedTextBoxColumn.CellTemplate> <DataTemplate> <Grid MouseRightButtonDown="Cell_MouseRightButtonDown" DataContext="{Binding}" ToolTip="{DynamicResource toolTipTemplate}"> <TextBlock Text="{Binding Cost}"/> <Border VerticalAlignment="Top" Width="5" Height="5" HorizontalAlignment="Right" Background="Red" Visibility="{Binding Comments,Converter={StaticResource MyConverter}}"/> </Grid> </DataTemplate> </telerik1:GridViewMaskedTextBoxColumn.CellTemplate> </telerik1:GridViewMaskedTextBoxColumn>it errors on any of them.