Posted 20 Jan 2011 Link to this post
Hi
When I set the ItemsSource of the RadTreeListView the first time after my silverlight 4 app has loaded. The tree is displayed correctly. Including expanded rows.
private
void
tlvLicMgmt_RowLoaded(
object
sender, Telerik.Windows.Controls.GridView.RowLoadedEventArgs e)
{
if
(_ExpNodes.Contains(((LicTLstNodeData)e.Row.DataContext).NodeID))
((TreeListViewRow)e.Row).IsExpanded =
true
;
}
If I reload the data the first row is displayed expanded but without showing the subnodes. When I click the first row the arrow changes to collapsed. When I click to expand again, the first two lines are there but almost the rest of the RadTreeListView client region is white only the last two lines are displayed too. When I click on the second node to collaps, everything starts to work fine again. I work with Version 2010.3.1110.1040.
Posted 21 Jan 2011 Link to this post
Posted 24 Jan 2011 Link to this post
tlvSwInv_RowLoaded(
(e.Row
is
TreeListViewRow && e.Row.DataContext
LicTLstNodeData)
//((TreeListViewRow)e.Row).IsExpanded = true;
ExpTlvRowDispatcherTimer ExpNodeTimer =
new
ExpTlvRowDispatcherTimer();
ExpNodeTimer.Interval =
TimeSpan(0, 0, 0, 0, 2);
ExpNodeTimer.row = (TreeListViewRow)e.Row;
ExpNodeTimer.evtHandler =
EventHandler(ExpNodeTimer_Tick);
ExpNodeTimer.Tick += ExpNodeTimer.evtHandler;
ExpNodeTimer.Start();
ExpNodeTimer_Tick(
sender, EventArgs e)
((ExpTlvRowDispatcherTimer)sender).Stop();
((ExpTlvRowDispatcherTimer)sender).row.IsExpanded =
((ExpTlvRowDispatcherTimer)sender).Tick -= ((ExpTlvRowDispatcherTimer)sender).evtHandler;
//http://forums.silverlight.net/forums/p/181670/412165.aspx
public
class
ExpTlvRowDispatcherTimer : DispatcherTimer
TreeListViewRow row {
get
set
; }
Posted 28 Jan 2011 Link to this post
tlvLicMgmt_DataLoaded(
List<
string
> ExpNodes =
>(_ExpNodes);
_ExpNodes.Clear();
foreach
(String NodeID
in
ExpNodes)
LicTLstNodeData NodeData = GetLicTListNode(NodeID, (ObservableCollection<LicTLstNodeData>)tlvLicMgmt.ItemsSource);
(NodeData !=
null
)
DependencyObject dpo =
this
.tlvLicMgmt.ItemContainerGenerator.ContainerFromItem(NodeData);
(dpo
TreeListViewRow)
(!((TreeListViewRow)dpo).IsExpanded)
((TreeListViewRow)dpo).IsExpanded =
else
tlvLicMgmt.ExpandHierarchyItem(NodeData);
LicTLstNodeData GetLicTListNode(String NodeID, ObservableCollection<LicTLstNodeData> SubNodes)
(LicTLstNodeData NodeData
SubNodes)
(NodeID == NodeData.NodeID)
return
NodeData;
LicTLstNodeData NodeDataSub = GetLicTListNode(NodeID, NodeData.SubNodes);
(NodeDataSub !=
NodeDataSub;
Posted 10 Oct 2012 Link to this post
Posted 22 Oct 2012 Link to this post
List<String> _ExpNodes =
List<String>();