This question is locked. New answers and comments are not allowed.
Hi Telerik guys
just as the title asked, how to expand a node by double clicking a row?
I am now using RowActivated event to do that, the XAML and the code behind are listed here:
is this a correct way? or there is some other better method?
thanks
just as the title asked, how to expand a node by double clicking a row?
I am now using RowActivated event to do that, the XAML and the code behind are listed here:
<telerik:RadTreeListView ItemsSource="{Binding People}"AutoGenerateColumns="False"RowIndicatorVisibility="Collapsed"GridLinesVisibility="None"RowHeight="22"HierarchyExpandButtonStyle="{StaticResource GridViewToggleButtonStyle1}"RowStyle="{StaticResource TreeListViewRowStyle1}"EditTriggers="None"CanUserFreezeColumns="False"ScrollViewer.HorizontalScrollBarVisibility="Disabled"BorderBrush="#FF595959"BorderThickness="0"RowActivated="RadTreeListView_RowActivated">private void RadTreeListView_RowActivated(object sender, Telerik.Windows.Controls.GridView.RowEventArgs e){ var viewRow = e.Row as Telerik.Windows.Controls.TreeListView.TreeListViewRow; if (viewRow.IsExpandable && !viewRow.IsExpanded) { (e.Row as Telerik.Windows.Controls.TreeListView.TreeListViewRow).IsExpanded = true; } else if (viewRow.IsExpandable && viewRow.IsExpanded) { (e.Row as Telerik.Windows.Controls.TreeListView.TreeListViewRow).IsExpanded = false; }}is this a correct way? or there is some other better method?
thanks