Hi,
I am using a PrintPreviewDialog, when I click on the Settings Button, I get the Excption below.
To open the Dialog I am only calling the PrintPreview() Method of an RadGridView. Thie error occurs in Telerik RadControls Q2 and Q3 2012 for Winforms. How can I avoid this error?
Kind Regards,
Li
Here is the ErrorMessage:
The value '0' is not a valid value for the enum 'PaperSourceKind'.
at System.ComponentModel.EnumConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
at System.ComponentModel.TypeConverter.ConvertToString(Object value)
at System.Drawing.Printing.PaperSource.ToString()
at Telerik.WinControls.UI.ListDataLayer.GetUnformattedValue(RadListDataItem item)
at Telerik.WinControls.UI.RadListDataItem.SetDataBoundItem(Boolean dataBinding, Object value)
at Telerik.WinControls.UI.ListControlListSource.InitializeBoundRow(RadListDataItem item, Object dataBoundItem)
at Telerik.WinControls.Data.RadListSource`1.InitializeBoundRows()
at Telerik.WinControls.Data.RadListSource`1.Initialize()
at Telerik.WinControls.Data.RadListSource`1.Bind(Object dataSource, String dataMember)
at Telerik.WinControls.Data.RadListSource`1.set_DataSource(Object value)
at Telerik.WinControls.UI.ListDataLayer.set_DataSource(Object value)
at Telerik.WinControls.UI.RadListElement.set_DataSource(Object value)
at Telerik.WinControls.UI.RadDropDownListElement.set_DataSource(Object value)
at Telerik.WinControls.UI.RadDropDownList.set_DataSource(Object value)
at Telerik.WinControls.UI.PrintSettingsDialog.LoadSettings()
at Telerik.WinControls.UI.GridViewPrintSettingsDialog.LoadSettings()
at Telerik.WinControls.UI.PrintSettingsDialog.set_PrintDocument(RadPrintDocument value)
at Telerik.WinControls.UI.PrintSettingsDialog..ctor(RadPrintDocument document)
at Telerik.WinControls.UI.GridViewPrintSettingsDialog..ctor(RadPrintDocument document)
at Telerik.WinControls.UI.RadGridView.Telerik.WinControls.UI.IPrintable.GetSettingsDialog(RadPrintDocument document)
at Telerik.WinControls.UI.RadPrintPreviewDialog.OnShowPrintSettingsDialog()
at Telerik.WinControls.UI.RadPrintPreviewDialog.buttonSettings_Click(Object sender, EventArgs e)
at Telerik.WinControls.RadElement.OnMouseDown(MouseEventArgs e)
at Telerik.WinControls.RadItem.OnMouseDown(MouseEventArgs e)
at Telerik.WinControls.RadElement.OnCLREventsRise(RoutedEventArgs args)
at Telerik.WinControls.RadElement.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.DoMouseDown(MouseEventArgs e)
at Telerik.WinControls.RadElement.CallDoMouseDown(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseDown(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseDown(MouseEventArgs e)
at Telerik.WinControls.UI.RadCommandBar.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I am using a PrintPreviewDialog, when I click on the Settings Button, I get the Excption below.
To open the Dialog I am only calling the PrintPreview() Method of an RadGridView. Thie error occurs in Telerik RadControls Q2 and Q3 2012 for Winforms. How can I avoid this error?
Kind Regards,
Li
Here is the ErrorMessage:
The value '0' is not a valid value for the enum 'PaperSourceKind'.
at System.ComponentModel.EnumConverter.ConvertTo(ITypeDescriptorContext context, CultureInfo culture, Object value, Type destinationType)
at System.ComponentModel.TypeConverter.ConvertToString(Object value)
at System.Drawing.Printing.PaperSource.ToString()
at Telerik.WinControls.UI.ListDataLayer.GetUnformattedValue(RadListDataItem item)
at Telerik.WinControls.UI.RadListDataItem.SetDataBoundItem(Boolean dataBinding, Object value)
at Telerik.WinControls.UI.ListControlListSource.InitializeBoundRow(RadListDataItem item, Object dataBoundItem)
at Telerik.WinControls.Data.RadListSource`1.InitializeBoundRows()
at Telerik.WinControls.Data.RadListSource`1.Initialize()
at Telerik.WinControls.Data.RadListSource`1.Bind(Object dataSource, String dataMember)
at Telerik.WinControls.Data.RadListSource`1.set_DataSource(Object value)
at Telerik.WinControls.UI.ListDataLayer.set_DataSource(Object value)
at Telerik.WinControls.UI.RadListElement.set_DataSource(Object value)
at Telerik.WinControls.UI.RadDropDownListElement.set_DataSource(Object value)
at Telerik.WinControls.UI.RadDropDownList.set_DataSource(Object value)
at Telerik.WinControls.UI.PrintSettingsDialog.LoadSettings()
at Telerik.WinControls.UI.GridViewPrintSettingsDialog.LoadSettings()
at Telerik.WinControls.UI.PrintSettingsDialog.set_PrintDocument(RadPrintDocument value)
at Telerik.WinControls.UI.PrintSettingsDialog..ctor(RadPrintDocument document)
at Telerik.WinControls.UI.GridViewPrintSettingsDialog..ctor(RadPrintDocument document)
at Telerik.WinControls.UI.RadGridView.Telerik.WinControls.UI.IPrintable.GetSettingsDialog(RadPrintDocument document)
at Telerik.WinControls.UI.RadPrintPreviewDialog.OnShowPrintSettingsDialog()
at Telerik.WinControls.UI.RadPrintPreviewDialog.buttonSettings_Click(Object sender, EventArgs e)
at Telerik.WinControls.RadElement.OnMouseDown(MouseEventArgs e)
at Telerik.WinControls.RadItem.OnMouseDown(MouseEventArgs e)
at Telerik.WinControls.RadElement.OnCLREventsRise(RoutedEventArgs args)
at Telerik.WinControls.RadElement.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.OnBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)
at Telerik.WinControls.RadElement.DoMouseDown(MouseEventArgs e)
at Telerik.WinControls.RadElement.CallDoMouseDown(MouseEventArgs e)
at Telerik.WinControls.ComponentInputBehavior.OnMouseDown(MouseEventArgs e)
at Telerik.WinControls.RadControl.OnMouseDown(MouseEventArgs e)
at Telerik.WinControls.UI.RadCommandBar.OnMouseDown(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at Telerik.WinControls.RadControl.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)