Telerik Forums
UI for WinForms Forum
2 answers
243 views
We recently changed all of our DateTime fields to DateTimeOffset. Now when we display one of the dates in a GridView, we get:

{"Converter can't convert"}

Is there something else we have to do to support DateTimeOffset in the grid?

Here is the detailed exception:

System.FormatException was unhandled
  Message=Converter can't convert
  Source=Telerik.WinControls.GridView
  StackTrace:
       at Telerik.WinControls.UI.RadDataConverter.ThrowFormatException(Exception ex, String message)
       at Telerik.WinControls.UI.RadDataConverter.ThrowFormatException(Exception ex)
       at Telerik.WinControls.UI.RadDataConverter.Format(Object value, Type targetType, Boolean coerceNullValue, IDataConversionInfoProvider converstionInfoProvider)
       at Telerik.WinControls.UI.GridDataCellElement.ApplyFormatString(Object value)
       at Telerik.WinControls.UI.GridDateTimeCellElement.ApplyFormatString(Object value)
       at Telerik.WinControls.UI.GridCellElement.SetContentCore(Object value)
       at Telerik.WinControls.UI.GridDataCellElement.SetContent()
       at Telerik.WinControls.UI.GridRowElement.UpdateContent()
       at Telerik.WinControls.UI.GridTableElement.UpdateCellContent(GridViewRowInfo rowInfo)
       at Telerik.WinControls.UI.GridTableElement.UpdateWhenItemChanged(DataViewChangedEventArgs args)
       at Telerik.WinControls.UI.GridTableElement.UpdateViewCore(Object sender, DataViewChangedEventArgs args)
       at Telerik.WinControls.UI.GridTableElement.UpdateView(Object sender, DataViewChangedEventArgs args)
       at Telerik.WinControls.UI.GridTableElement.ProcessTemplateEvent(GridViewEvent eventData)
       at Telerik.WinControls.UI.GridTableElement.Telerik.WinControls.UI.IGridViewEventListener.ProcessEvent(GridViewEvent eventData)
       at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessCollection(GridViewEvent gridEvent, PriorityWeakReferenceList list, GridEventProcessMode processMode)
       at Telerik.WinControls.UI.GridViewEventProcessEntity.ProcessEvent(GridViewEvent gridEvent)
       at Telerik.WinControls.UI.GridViewSynchronizationService.NotifyListeners(GridViewEvent gridEvent)
       at Telerik.WinControls.UI.GridViewSynchronizationService.FlushEvents()
       at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewEvent gridEvent)
       at Telerik.WinControls.UI.GridViewSynchronizationService.DispatchEvent(GridViewTemplate template, GridViewEvent eventData, Boolean postUI)
       at Telerik.WinControls.UI.GridViewTemplate.DispatchEvent(GridViewEvent gridEvent, Boolean postUI)
       at Telerik.WinControls.UI.GridViewTemplate.DispatchDataViewChangedEvent(Object sender, DataViewChangedEventArgs args)
       at Telerik.WinControls.UI.GridViewTemplate.OnViewChanged(Object sender, DataViewChangedEventArgs e)
       at Telerik.WinControls.UI.GridViewTemplate.CollectionView_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at Telerik.WinControls.Data.RadCollectionView`1.OnCollectionChanged(NotifyCollectionChangedEventArgs args)
       at Telerik.WinControls.Data.RadDataView`1.ProcessCollectionChanged(NotifyCollectionChangedEventArgs args)
       at Telerik.WinControls.Data.RadCollectionView`1.source_CollectionChanged(Object sender, NotifyCollectionChangedEventArgs e)
       at Telerik.WinControls.Data.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
       at Telerik.WinControls.Data.RadListSource`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
       at Telerik.WinControls.Data.RadListSource`1.ChangeItem(Int32 index, TDataItem item, String propertyName)
       at Telerik.WinControls.Data.RadListSource`1.currencyManager_ListChanged(Object sender, ListChangedEventArgs e)
       at System.Windows.Forms.CurrencyManager.OnListChanged(ListChangedEventArgs e)
       at System.Windows.Forms.CurrencyManager.List_ListChanged(Object sender, ListChangedEventArgs e)
       at System.Windows.Forms.BindingSource.OnListChanged(ListChangedEventArgs e)
       at System.Windows.Forms.BindingSource.ListItem_PropertyChanged(Object sender, EventArgs e)
       at System.ComponentModel.PropertyDescriptor.OnValueChanged(Object component, EventArgs e)
       at System.ComponentModel.ReflectPropertyDescriptor.OnValueChanged(Object component, EventArgs e)
       at System.ComponentModel.ReflectPropertyDescriptor.OnINotifyPropertyChanged(Object component, PropertyChangedEventArgs e)
       at System.ComponentModel.PropertyChangedEventHandler.Invoke(Object sender, PropertyChangedEventArgs e)
       at SCStar.BL.BOBase.NotifyPropertyChanged(String propertyName) in C:\Users\Deb\Clients\SpaceControl\SCStar\SCStarApplication\SCStar.BL\BoBase.vb:line 356
       at SCStar.BL.BOBase.SetEntityState(Nullable`1 newEntityState, String propertyName) in C:\Users\Deb\Clients\SpaceControl\SCStar\SCStarApplication\SCStar.BL\BoBase.vb:line 731
       at SCStar.BL.OnSite.AgreementDiscount.set_DiscountBeginDate(Nullable`1 value) in C:\Users\Deb\Clients\SpaceControl\SCStar\SCStarApplication\SCStar.BL\Site\AgreementDiscount.vb:line 183
       at SCStar.BL.OnSite.AgreementDiscounts.SetDiscountData(Agreement currentAgreementInstance, DateTimeOffset CurrentSiteDateTimeWithOffset, Nullable`1 isMoveIn) in C:\Users\Deb\Clients\SpaceControl\SCStar\SCStarApplication\SCStar.BL\Site\AgreementDiscounts.vb:line 430
       at SCStar.PaymentDiscountWin.SetDiscountData(AgreementDiscount updatedAgreementDiscountInstance) in C:\Users\Deb\Clients\SpaceControl\SCStar\SCStarApplication\SCStar.Win\PaymentDiscountWin.vb:line 476
       at SCStar.PaymentDiscountWin.PaymentDiscountGridView_CellEndEdit(Object sender, GridViewCellEventArgs e) in C:\Users\Deb\Clients\SpaceControl\SCStar\SCStarApplication\SCStar.Win\PaymentDiscountWin.vb:line 161
       at Telerik.WinControls.UI.RadGridView.OnCellEndEdit(Object sender, GridViewCellEventArgs e)
       at Telerik.WinControls.UI.EventDispatcher.RaiseEvent[T](Object eventKey, Object sender, T args)
       at Telerik.WinControls.UI.GridViewEditManager.EndEditCore(Boolean validate, Boolean cancel)
       at Telerik.WinControls.UI.GridViewEditManager.EndEdit()
       at Telerik.WinControls.UI.GridRowBehavior.ValidateOnUserInput(MouseEventArgs e)
       at Telerik.WinControls.UI.GridRowBehavior.OnMouseDown(MouseEventArgs e)
       at Telerik.WinControls.UI.BaseGridBehavior.OnMouseDown(MouseEventArgs e)
       at Telerik.WinControls.UI.RadGridView.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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.RunDialog(Form form)
       at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
       at System.Windows.Forms.Form.ShowDialog()
       at SCStar.UIController.DisplayDiscountDialog() in C:\Users\Deb\Clients\SpaceControl\SCStar\SCStarApplication\SCStar.Win\UIController.vb:line 1483
       at SCStar.PaymentControl.EditDiscounts() in C:\Users\Deb\Clients\SpaceControl\SCStar\SCStarApplication\SCStar.Win\PaymentControl.vb:line 1257
       at SCStar.PaymentControl.DiscountButton_Click(Object sender, EventArgs e) in C:\Users\Deb\Clients\SpaceControl\SCStar\SCStarApplication\SCStar.Win\PaymentControl.vb:line 294
       at System.Windows.Forms.Control.OnClick(EventArgs e)
       at Telerik.WinControls.RadControl.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadButtonBase.ButtonElement_Click(Object sender, EventArgs e)
       at Telerik.WinControls.RadItem.OnClick(EventArgs e)
       at Telerik.WinControls.UI.RadButtonItem.OnClick(EventArgs e)
       at Telerik.WinControls.RadItem.DoClick(EventArgs e)
       at Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)
       at Telerik.WinControls.RadElement.RaiseRoutedEvent(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.DoMouseUp(MouseEventArgs e)
       at Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)
       at Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)
       at System.Windows.Forms.Control.WmMouseUp(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.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
       at System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
       at System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
       at System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
       at Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
       at SCStar.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:line 81
       at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.AppDomain.nExecuteAssembly(RuntimeAssembly assembly, String[] args)
       at System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)
       at System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)
       at System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)
       at System.Activator.CreateInstance(ActivationContext activationContext)
       at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()
       at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean ignoreSyncCtx)
       at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
       at System.Threading.ThreadHelper.ThreadStart()
  InnerException:
Peter
Telerik team
 answered on 06 Oct 2011
2 answers
233 views
Hello,
I have a grid with a GridViewTextBoxColumn.  When this cell goes into edit mode, I would like to have a button that the user can click to launch a modal dialog form.  On this form the user can edit the data of selected cell like on the Teleriks Expression Editor form.

Any help is greatly appreciated.

Thanks,
Sz

Szotyi
Top achievements
Rank 1
 answered on 06 Oct 2011
4 answers
192 views
Hey at Telerik

I have found a bug in the RadDateTimePicker.
When the control is continuously enabled/disabled the Text element of the control stops showing the date.

I need this functionality to rebind a RadDateTimePicker to a SelectionChanged event on a RadGrid.

I have reproduced the bug in a little test project (Of cource without references). http://kort2.lifa.dk/examples/RadDateTimePickerMissingDateText.rar

Try and disable/enable the RadDateTimePicker numerous times, after fourth click the Text control element of the RadDateTimePicker stops working.

Sincerly Jan.
Peter
Telerik team
 answered on 06 Oct 2011
5 answers
184 views
hello,
i have a DropDwonColumn in my Grid i want to bind a specific cell in that column not all cells in the column.
is that possible?
Alexander
Telerik team
 answered on 05 Oct 2011
3 answers
257 views
Hi there

I want to use RichTextBox in confirmation dialog (using docx templates) and insert string and Images at corresponding bookmark position.

foreach (BookmarkRangeStart bm in radRichTextBox1.Document.GetAllBookmarks())
{
        switch (bm.Name) 
        {
           case 'OrderNo':
              //how to replace only content of bookmark leaving formating and bookmark
              break;
            ...
        }
}

Need help - thanks!
Julian Benkov
Telerik team
 answered on 05 Oct 2011
1 answer
162 views

Hi

Sometimes the following exception is thrown in our application:

Parameter is invalid.

ved System.Drawing.Region.GetHrgn(Graphics g)    
ved System.Windows.Forms.Control.GetHRgn(Region region)    
ved System.Windows.Forms.Control.OnHandleCreated(EventArgs e)    
ved System.Windows.Forms.Form.OnHandleCreated(EventArgs e)    
ved System.Windows.Forms.Control.WmCreate(Message& m)    
ved System.Windows.Forms.Control.WndProc(Message& m)    
ved System.Windows.Forms.ScrollableControl.WndProc(Message& m)    
ved System.Windows.Forms.ContainerControl.WndProc(Message& m)    
ved System.Windows.Forms.Form.WmCreate(Message& m)    
ved System.Windows.Forms.Form.WndProc(Message& m)    
ved Telerik.WinControls.UI.RadFormControlBase.WndProc(Message& m) i :linje 0    
ved System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)    
ved System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)    
ved System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

 

No line of code is specified in this exception. One of our customer is using Citrix and this exception is more frequent there.

How can I solve this problem?

The exception is oftenly thrown while refreshing data in RadGridView, RadDatagridviewComboboxes and other controls. Actually I can not reproduce this exception on my machine but in the situation told by customer, we are refreshing data.

Telerik version used by application is v2011.1.11.419.

Any help would be appreciated.

Thanks

Regards

 

Jack
Telerik team
 answered on 05 Oct 2011
1 answer
100 views
hi everybody is there a way that we could loop to selected rows using two buttons button1 and button2, like for example i want the small arrow to point to the first selected row with document name f10_oct1_en.pdf, currently it is pointing to f36_may07_en.pdf, and each time i click the button it jumps to the next selected row which in my case if the arrow is on f10_oct1_en.pdf will go to f21_dec17_en.pdf, same thing will happen to the prev button only going backwards..
i have attached a png file on the thread so you could understand what i mean...
thank you very much...
Emanuel Varga
Top achievements
Rank 1
 answered on 05 Oct 2011
8 answers
145 views
I have used Telerik ASP.net AJAX and Reporting in the past.  I now have a project that seems to lend itself to WinForms, but my concern is that I would rather have it be a web application.  Here is what it needs to do: 
  1. integrate with a currently working classic asp web program  (not a problem as we already have a .net component doing this)
  2. have a bunch (25) of forms that the users will be filling out that will save the data to a database.  the forms are some yes/no questions, some fill in, and some drop down choices: pretty basic stuff just collecting data. 
  3. some users will only be viewing these forms and their data; need to have them open automatically in a pdf.
  4. in some cases, if the user answers a certain question with a Yes, we need to ask the user (probably with a popup box) if they want to do something, and we have to save that response to a separate database.
  5. would like to have some of the questions appear/disappear based on responses to other questions.
  6. need to be able to work offline and then update the database when they are connected at a later time

I would prefer that they don't have a standalone application that has to be installed.  That is my concern with using the WinForms.  Any advice would be appreciated.

Thanks, Amy
Amy
Top achievements
Rank 1
 answered on 04 Oct 2011
6 answers
733 views
I did some searching around, but couldn't find an answer to this.

I have a PageView with 2 tabs that I have set to use the Office2007Silver theme.  I have added images to both of the tab and while those look nice the text on the tabs is too small and I would like to increase it.

I have tried changing the font size in several places, but none of them change the font.

I tried directly in the properties of the PageView object. 

I also expanded the PageView Tasks and clicked "Edit UI Elements" because this section helped me change properties of buttons I'd applied a theme to.  I tried the PageViewLabelElements, StripButtonElements... eventually I changed the font size for every single element in this section, but nothing changed.

So where/how do I change the font size on a tab on a PageView object that has a theme applied to it?

/<evin
Kevin
Top achievements
Rank 1
 answered on 04 Oct 2011
1 answer
139 views
I am using telerik GridView to modify a Visual Studio extension sln. the Gridview has checkboxColumn, textColumn and ImageColumn. CheckboxColumn uses Telerik.WinControls.UI which is a ~7MB dll file. Adding a 7MB reference file within Visual Studio extension package  is not acceptable. Is there any other way I can use Checkbox column without referencing the large dll file.
Emanuel Varga
Top achievements
Rank 1
 answered on 04 Oct 2011
Narrow your results
Selected tags
Tags
GridView
General Discussions
Scheduler and Reminder
Treeview
Dock
RibbonBar
Themes and Visual Style Builder
ChartView
Calendar, DateTimePicker, TimePicker and Clock
DropDownList
Buttons, RadioButton, CheckBox, etc
ListView
ComboBox and ListBox (obsolete as of Q2 2010)
Form
Chart (obsolete as of Q1 2013)
PageView
MultiColumn ComboBox
TextBox
RichTextEditor
PropertyGrid
Menu
RichTextBox (obsolete as of Q3 2014 SP1)
Panelbar (obsolete as of Q2 2010)
PivotGrid and PivotFieldList
Tabstrip (obsolete as of Q2 2010)
MaskedEditBox
CommandBar
PdfViewer and PdfViewerNavigator
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
AutoCompleteBox
Label
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
CollapsiblePanel
LayoutControl
ShapedForm
SyntaxEditor
Wizard
TextBoxControl
Conversational UI, Chat
DateTimePicker
TabbedForm
CAB Enabling Kit
WaitingBar
GroupBox
DataEntry
ScrollablePanel
ScrollBar
ImageEditor
Tools - VSB, Control Spy, Shape Editor
BrowseEditor
DataFilter
FileDialogs
ColorDialog
Gauges (RadialGauge, LinearGauge, BulletGraph)
ApplicationMenu
RangeSelector
CardView
WebCam
NavigationView
BindingNavigator
RibbonForm
Styling
Barcode
PopupEditor
TaskBoard
Callout
ColorBox
PictureBox
FilterView
Accessibility
VirtualKeyboard
DataLayout
Licensing
ToastNotificationManager
ValidationProvider
CalculatorDropDown
Localization
TimePicker
BreadCrumb
ButtonTextBox
FontDropDownList
BarcodeView
Overlay
Security
LocalizationProvider
Dictionary
TreeMap
StepProgressBar
SplashScreen
Flyout
Separator
SparkLine
ToolbarForm
NotifyIcon
DateOnlyPicker
AI Coding Assistant
Rating
TimeSpanPicker
Calculator
OfficeNavigationBar
TaskbarButton
HeatMap
SlideView
PipsPager
AIPrompt
TaskDialog
TimeOnlyPicker
SpeechToTextButton
+? more
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Hiba
Top achievements
Rank 1
Iron
Iron
Rob
Top achievements
Rank 3
Bronze
Bronze
Iron
Max
Top achievements
Rank 1
Veteran
Iron
Alina
Top achievements
Rank 1
Rakhee
Top achievements
Rank 1
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?