or
<t:RadTreeListView x:Name="radTreeListView" AutoGenerateColumns="False" SelectionChanging="radTreeListView_SelectionChanging"> <t:RadTreeListView.ChildTableDefinitions> <t:TreeListViewTableDefinition ItemsSource="{Binding Children}" /> </t:RadTreeListView.ChildTableDefinitions> <t:RadTreeListView.Columns> <t:GridViewDataColumn DataMemberBinding="{Binding Name}" Header="Name" IsReadOnly="True" > <t:GridViewDataColumn.CellTemplate> <DataTemplate> <Label Content="{Binding Name}"></Label> </DataTemplate> </t:GridViewDataColumn.CellTemplate> </t:GridViewDataColumn> </t:RadTreeListView.Columns></t:RadTreeListView>private void radTreeListView_SelectionChanging(object sender, SelectionChangingEventArgs e){ var selectedItem = e.AddedItems.FirstOrDefault(); e.Cancel = true; this.radTreeListView.ExpandHierarchyItem(selectedItem);}using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks;using System.Windows;using System.Windows.Controls;using System.Windows.Data;using System.Windows.Documents;using System.Windows.Input;using System.Windows.Media;using System.Windows.Media.Imaging;using System.Windows.Navigation;using System.Windows.Shapes;using Telerik.Windows.Controls;namespace MessageBoxAutoClosed{ /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); } private void Button_Click(object sender, RoutedEventArgs e) { UserControl1 l_userControl = new UserControl1(); RadWindow l_hostWindow = new RadWindow() { Owner = System.Windows.Application.Current.MainWindow, WindowStartupLocation = WindowStartupLocation.CenterOwner }; ScrollViewer l_scrollViewer = new ScrollViewer(); l_scrollViewer.VerticalScrollBarVisibility = ScrollBarVisibility.Auto; l_scrollViewer.HorizontalScrollBarVisibility = ScrollBarVisibility.Auto; l_scrollViewer.Content = l_userControl; l_hostWindow.Content = l_scrollViewer; l_hostWindow.Show(); //l_hostWindow.Close(); MessageBox.Show("MessageBox", "MessageBox", MessageBoxButton.OK, MessageBoxImage.Information, MessageBoxResult.OK); } }}
Hello
I would like to use the RadDataForm as interface for a invoice manager.
Here I would like to use the RadGridView to enter a list of products. If the user clicks the escape or enter keyboard button inside the RadGridView, the the commit or cancel action gets executed of the RadDataForm. How can we prevent this?
Thank you!
<Grid> <t:RadRichTextBox /></Grid>