or
The property 'ColumnName' was not found in type 'GridViewCell'.
Hi,
I've notcied that when I try to print a document but push the cancel button the document is still sent to the printer.
Has anyone else noticed this?
I'm using libraries 2012.2.725.40.
Here's my print method:
private void btnPrint_Click(object sender, RoutedEventArgs e){ this.radRichTextBox.Print("TAS2 Spec", PrintMode.Native);}Thanks for your time,
Rob
<Window x:Class="RadControlsWpfApp3.InputsWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" Title="InputsWindow" Height="400" Width="300"> <Window.Resources> <telerik:MetroTheme x:Key="Theme" /> <Style TargetType="ScrollViewer"> <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" /> </Style>
<Style TargetType="TextBox">
<Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" />
</Style>
<Style TargetType="Button"> <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" /> </Style> <Style TargetType="CheckBox"> <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" /> </Style> <Style TargetType="RadioButton"> <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" /> </Style> <Style TargetType="ListBox"> <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" /> </Style> <Style TargetType="PasswordBox"> <Setter Property="telerik:StyleManager.Theme" Value="{StaticResource Theme}" /> </Style> </Window.Resources> <Grid> <StackPanel Margin="5"> <Label Content="Username" /> <TextBox /> <Label Content="Password" /> <PasswordBox /> <Label Content="Gender" /> <StackPanel Orientation="Horizontal"> <RadioButton Content="Male" /> <RadioButton Content="Female" /> </StackPanel> <Label Content="list" /> <ListBox> <ListBoxItem>test1</ListBoxItem> <ListBoxItem>test2</ListBoxItem> <ListBoxItem>test3</ListBoxItem> </ListBox> <CheckBox Content="Agree" /> <Button Content="Submit" /> </StackPanel> </Grid></Window><Window x:Class="RadGridViewFocusStealing.MainWindow" xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:RadGridViewFocusStealing="clr-namespace:RadGridViewFocusStealing" Title="MainWindow" Height="350" Width="525"> <Grid> <Grid.RowDefinitions> <RowDefinition Height="50" /> <RowDefinition Height="29" /> <RowDefinition Height="259*" /> </Grid.RowDefinitions> <Grid.DataContext> <RadGridViewFocusStealing:GridDataContextViewModel/> </Grid.DataContext> <TextBlock Grid.Row="0" Text="Make the RadPaneGroup as floating. Select a record inside of the grid, than add some new records while typing in the TextBox below. You will see the focus will lost. If the RadPaneGroup is docked its all fine." TextWrapping="Wrap" /> <telerik:RadWatermarkTextBox Grid.Row="1" Text="{Binding Path=DoSomethingOnChange, UpdateSourceTrigger=Explicit}" KeyUp="TextBox_KeyUp" Margin="2" > <telerik:RadWatermarkTextBox.WatermarkContent> <TextBlock Text="Just type any text and press ↵ Enter to apply" Foreground="Gray"/> </telerik:RadWatermarkTextBox.WatermarkContent> </telerik:RadWatermarkTextBox> <telerik:RadDocking Grid.Row="2"> <telerik:RadDocking.Items> <telerik:RadSplitContainer x:Name="radSplitContainer" > <telerik:RadSplitContainer.Items> <telerik:RadPaneGroup > <telerik:RadPaneGroup.Items> <telerik:RadPane> <telerik:RadGridView AutoGenerateColumns="False" ItemsSource="{Binding Path=DataItems}" ShowGroupPanel="False"> <telerik:RadGridView.Columns> <telerik:GridViewDataColumn DataMemberBinding="{Binding Path=Property1}"/> </telerik:RadGridView.Columns> </telerik:RadGridView> </telerik:RadPane> </telerik:RadPaneGroup.Items> </telerik:RadPaneGroup> </telerik:RadSplitContainer.Items> </telerik:RadSplitContainer> </telerik:RadDocking.Items> </telerik:RadDocking> </Grid></Window>using System.Collections.Generic;using System.ComponentModel;using System.Linq;using System.Windows;using System.Windows.Controls;using System.Windows.Input;using Telerik.Windows.Controls.Docking;namespace RadGridViewFocusStealing{ /// <summary> /// Interaction logic for MainWindow.xaml /// </summary> public partial class MainWindow : Window { public MainWindow() { InitializeComponent(); radSplitContainer.InitialPosition = DockState.FloatingDockable; } private void TextBox_KeyUp(object sender, System.Windows.Input.KeyEventArgs e) { if (e.Key == Key.Enter && e.KeyboardDevice.Modifiers == ModifierKeys.None) { var b = ((TextBox)sender).GetBindingExpression(TextBox.TextProperty); if (b != null) b.UpdateSource(); } } } public class GridDataContextViewModel : INotifyPropertyChanged { private IEnumerable<GridDataItem> _dataItems; public GridDataContextViewModel() { _dataItems = new GridDataItem[] { new GridDataItem() { Property1 = "Foo" }, new GridDataItem() { Property1 = "Baa" } }; } private string _doSomethingOnChange; public string DoSomethingOnChange { get { return _doSomethingOnChange; } set { _doSomethingOnChange = value; OnNotifyPropertyChanged("DoSomethingOnChange"); // As simulation, creating a new data array (e.g. a result of a SQLQuery as array) for GridView.ItemsSource DataItems = _dataItems.Union(new GridDataItem[] { new GridDataItem { Property1 = value } }).ToArray(); } } public IEnumerable<GridDataItem> DataItems { get { return _dataItems; } private set { if (_dataItems != value) { _dataItems = value; OnNotifyPropertyChanged("DataItems"); } } } private void OnNotifyPropertyChanged(string propertyName) { if (PropertyChanged != null) PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); } public event PropertyChangedEventHandler PropertyChanged; } public class GridDataItem { public string Property1 { get; set; } }}<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation" xmlns:MHSVisualBoard_ViewModels="clr-namespace:MHSVisualBoard.ViewModels" mc:Ignorable="d" x:Class="MHSVisualBoard.MissionsByForklift" x:Name="UserControl" d:DesignWidth="582" d:DesignHeight="400" MaxWidth="550" MaxHeight="300" Width="550" Height="Auto"> <Grid x:Name="LayoutRoot"> <UniformGrid Margin="0" Rows="2" Columns="1"> <telerik:RadChart x:Name="charMissionsTrend" Content="" Style="{DynamicResource RadChartStyle}" OverridesDefaultStyle="True"/> <telerik:RadChart x:Name="chartMissionAssignedVsFinished" Content="" Style="{DynamicResource RadChartStyle}" OverridesDefaultStyle="True" ItemsSource="{Binding Data, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"> <telerik:RadChart.DataContext> <MHSVisualBoard_ViewModels:MissionsByForkliftViewModel> <MHSVisualBoard_ViewModels:MissionsByForkliftViewModel.Data> <MHSVisualBoard_ViewModels:ForkliftMissions AssignedMissions="12" FinishedMissions="3" ForkliftId="E1"/> <MHSVisualBoard_ViewModels:ForkliftMissions AssignedMissions="15" FinishedMissions="9" ForkliftId="E2"/> </MHSVisualBoard_ViewModels:MissionsByForkliftViewModel.Data> </MHSVisualBoard_ViewModels:MissionsByForkliftViewModel> </telerik:RadChart.DataContext> <telerik:RadChart.SeriesMappings> <telerik:SeriesMapping SeriesDefinition="{DynamicResource ISeriesDefinitionBarOne}"> <telerik:ItemMapping DataPointMember="XCategory" FieldName="{Binding Data[0].ForkliftId}"/> <telerik:ItemMapping FieldName="{Binding Data[0].AssignedMissions}" DataPointMember="YValue"/> </telerik:SeriesMapping> </telerik:RadChart.SeriesMappings> </telerik:RadChart> </UniformGrid> </Grid></UserControl>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Telerik.Windows.Controls;
using System.Collections.ObjectModel;
using System.ComponentModel;
namespace MHSVisualBoard.ViewModels
{
public class MissionsByForkliftViewModel : ViewModelBase
{
public MissionsByForkliftViewModel()
{
_data = new ObservableCollection<ForkliftMissions>();
}
public ObservableCollection<ForkliftMissions> Data
{
get
{
return _data;
}
set
{
if (value != _data)
{
_data = value;
this.OnPropertyChanged("Data");
}
}
}
private ObservableCollection<ForkliftMissions> _data;
}
public class ForkliftMissions : INotifyPropertyChanged
{
public ForkliftMissions()
{
}
public event PropertyChangedEventHandler PropertyChanged;
public string ForkliftId
{
get
{
return _forkliftId;
}
set
{
_forkliftId = value;
}
}
public int AssignedMissions
{
get
{
return _assignedMissions;
}
set
{
if (value != _assignedMissions)
{
_assignedMissions = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("AssignedMissions"));
}
}
}
public int FinishedMissions
{
get
{
return _finishedMissions;
}
set
{
if (value != _finishedMissions)
{
_finishedMissions = value;
if (PropertyChanged != null)
PropertyChanged(this, new PropertyChangedEventArgs("FinishedMissions"));
}
}
}
private string _forkliftId;
private int _finishedMissions;
private int _assignedMissions;
}
}