<telerik:RadBusyIndicatorIsBusy="{Binding IsBusy, FallbackValue=False, TargetNullValue=False}" ...>
Some Buttons and TextBoxes</telerik:RadBusyIndicator>
<Application.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/System.Windows.xaml"/> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.xaml"/> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Docking.xaml"/> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.GridView.xaml"/> <ResourceDictionary Source="/Telerik.Windows.Themes.Windows8;component/Themes/Telerik.Windows.Controls.Navigation.xaml"/> </ResourceDictionary.MergedDictionaries> </ResourceDictionary></Application.Resources>
<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"> <Style x:Key="myStyle" TargetType="Button"> <Setter Property="Background" Value="Orange" /> <Setter Property="FontStyle" Value="Italic" /> <Setter Property="Padding" Value="8,4" /> <Setter Property="Margin" Value="4" /> </Style> <!-- Declare the template used for the left pages --> <DataTemplate x:Name ="LeftPageTemplate" > <StackPanel Margin="10" Background="LightGray"> </StackPanel> </DataTemplate> <!-- Declare the template used for the right pages --> <DataTemplate x:Name="RightPageTemplate" DataType="Grid" > <StackPanel Margin="10" Background="LightBlue"> <TextBlock HorizontalAlignment="Right" FontSize="24" FontWeight="Bold" Text="{Binding Title}" /> <Image Width="240" Height="320" Source="{Binding Image}" /> <StackPanel HorizontalAlignment="Right" Orientation="Horizontal"> <TextBlock FontWeight="Bold" Text="Date Taken:" /> <TextBlock Text="{Binding DateTaken}" /> </StackPanel> <StackPanel HorizontalAlignment="Right" Orientation="Horizontal"> <TextBlock FontWeight="Bold" Text="Size:" /> <TextBlock Text="{Binding Size}" /> </StackPanel> </StackPanel> </DataTemplate> </ResourceDictionary>
<telerik:RadTreeListView.ChildTableDefinitions>
<telerik:TreeListViewTableDefinition ItemsSource="{Binding Source=DataSetVM, Path=TreeRelation}"/>
</telerik:RadTreeListView.ChildTableDefinitions>
</telerik:RadTreeListView>
The hierarchy data can be display correctly in TreeListView. Since I am binding the data view to UI with Two Way mode, so I think if I detele one row in data view, the UI will be updated accordingly. But actually, only delete a root item can refresh correctly. Delete sub items on UI cannot refersh, they need additional refersh manually. For example, I have following structure in TreeListView:
Group 1
|_Item 1
|_Item2
Group 2
Delete Group2 in DataSet, UI will remove Group 2 automatically. But if I remove Item 2 in DataSet, UI will not update unless I refersh UI manually.
So my question is does anybody know how to solve this sub items refersh problem? This is very important for us to decide if choose Telerik or not. So please give any clue you may have.
private void Window_Loaded(object sender, RoutedEventArgs e)
{
MyLinqObjDataContext db = new MyLinqObjDataContext();
radGridView1.ItemsSource = db.TBLTests;
}