Telerik Forums
UI for WinForms Forum
1 answer
203 views
Hello everybody,

can anybody tell me if it is possible (and if how) to use windows default spellchecking feature?

Below there is a complete codesippit how to accomplish this with a standard control. In this sample a textBox will be added on Form1.vb. I want to do exactly the same with a radTextBox. Type some missspelled text an you will see the spellCheck feature.

Thanks for answering.
Mat

###

'Reference:
'          PresentationCore.dll
'          PresentationFramework.dll
'          WindowsFormsIntegration.dll
'          WindowsBase.dll


Imports System.Windows.Forms.Integration


Public Class Form1

    Private WithEvents txt As New MySpellCheck

    Public Sub New()
        InitializeComponent()

        Me.Controls.Add(txt.ElementHost)

    End Sub

End Class


Public Class MySpellCheck
    Inherits System.Windows.Controls.TextBox


    Public Sub New()
        Dim eh As ElementHost = New ElementHost
        System.Windows.Controls.SpellCheck.SetIsEnabled(Me, True)
        With eh
            .Child = Me
        End With
        Me.ElementHost = eh
    End Sub


    Private _elementhost As ElementHost
    Public Property ElementHost() As ElementHost
        Get
            Return Me._elementhost
        End Get
        Set(ByVal value As ElementHost)
            Me._elementhost = value
        End Set
    End Property

End Class
Jack
Telerik team
 answered on 23 Sep 2010
1 answer
168 views

When populating a schedule with appointments from my database, i want to have the appointments automatically have their resources (people) assigned.  How does this work?  Am I to assign the ResourceID of the AppointmentMappingInfo object the resource ID from my database?  I am using a business object for my appointments and populating the Resources collection of the RadScheduler manually with the resource name and ID.

What are the options of getting the appointments and resources to be related to each other so when the schedule is displayed, the resource drop down in the Edit Appointments Dialog is assigned the resource?  Also, when viewing the schedule in resource grouping mode, the resources are assigned to their appointments.  

Me.RadScheduler1.AppointmentFactory = New CustomAppointmentFactory

 

 

 

 

dataSource.EventProvider.AppointmentFactory = RadScheduler1.AppointmentFactory

 

 

 

Dim appointmentMappingInfo As New AppointmentMappingInfo()

 

appointmentMappingInfo.Start =

 

"Start"

 

 

 

 

appointmentMappingInfo.[End] = "End"

 

 

 

 

appointmentMappingInfo.Summary = "Subject"

 

 

 

 

appointmentMappingInfo.Description = "Description"

 

 

 

 

appointmentMappingInfo.Location = "Location"

 

 

 

 

appointmentMappingInfo.UniqueId = "Id"

 

 

 

 

appointmentMappingInfo.Exceptions = "Exceptions"

 

 

 

 

appointmentMappingInfo.ResourceId = "EmpID"

 

 

 

 

dataSource.EventProvider.Mapping = appointmentMappingInfo

 

 

 

' assign the generic List of MyAppointment as the EventProvider data source

 

 

 

 

dataSource.EventProvider.DataSource = appointments

 

 

 

Me.RadScheduler1.DataSource = dataSource

 

Dobry Zranchev
Telerik team
 answered on 23 Sep 2010
4 answers
263 views

Hi,

In the DateTimePicker I'm looking for an event which happens when a user changes the date (by mouse or keyboard) but not when a date is set- (for example:  DateTimePicker1.Value=DateTime.Now)

In other controls I found events or properties which supported this scenario, but in this case I couldn't find.

 

Thanks

Dobry Zranchev
Telerik team
 answered on 23 Sep 2010
2 answers
161 views
Hi there,

I have just upgraded my application to the latest version and discovered a weird bug with the GridView_CellFormatting event.

The previous version was trying to format the colors of the current cell depending on the value of another cell in the same row.

To simplify this behaviour, we can just look at 3 columns in a grid. Column 1: ID, Column 2: Name, Column 3: Status

If the status is True, Column 1's colour would be Blue and if the status is False, then column 1's colour would be Red.

in the previous version, the code was working fine..but with the new version, it seems that the Name column would also be affected.

and everytime the grid is refreshed through some random action e.g. moving of scrollbars, the name column's forecolor would change randomly..to either Red or Blue when those colours should only be affecting column 1.

private void gvDocuments_CellFormatting(object sender, CellFormattingEventArgs e)
        {
            
                if (e.CellElement.RowIndex >= 0)
                {
                    GridViewColumn col = e.CellElement.ColumnInfo as GridViewColumn;
                    GridViewRowInfo row = e.CellElement.RowInfo;
                     
                    string fieldName = col.Name;
                    if (fieldName == "Id")
                    {
                        if (row.Cells["Status"].Value.ToString() == "T")
                        {
 
                            e.CellElement.ForeColor = Color.Blue;
                            e.CellElement.Font = font;
                        }
                        else
                        {
                            e.CellElement.ForeColor = Color.Red;
                            e.CellElement.Font = font;
                        }
                    }    
                }
          }

P.s. I think The #2 example in http://www.telerik.com/help/winforms/formatting_cells.html is wrong... RowInfo.Cells[ColumnName] does not contain the CellElement property.

e.CellElement.RowInfo.Cells["column1"].CellElement.ForeColor
Jack
Telerik team
 answered on 23 Sep 2010
1 answer
175 views
Dear Sir,

I wanted to export gridview data into .pdf file. I gone through kb and it tells that you need to create an object of ExportToPDF. Now I cannot find the specified class in the Telerik.WinControls.UI.Export namespace. There is only one class in the given namespace i.e. ExportToExcelML!

I am using Telrik Controls for WinForms Q1 2010.

Thanks,
Divyesh
Martin Vasilev
Telerik team
 answered on 23 Sep 2010
8 answers
268 views
The title of the thread says it all:

Me.RadGridView.Rows().Cells().Style.BackColor = Color.Yellow

Me.RadGridView.Rows().Cells().Style.BackColor = Color.Yellow

Me.RadGridView.Rows().Cells().Style.BackColor = Color.Yellow

Me.RadGridView.Rows().Cells().Style.BackColor = Color.Yellow

Me.RadGridView.Rows().Cells().Style.DrawFill = True

I understand that the cell element is gone but this code worked last build using the CellElement but not with the new Style object. I would assume there is a way to change the back color of a cell at run-time. Please give me the correct way so my code will work. Thank you.


OK More Info.....

Me.RadGridView.Rows().Cells().Style.ForeColor = Color.Yellow

this works!!! soooo....just maybe this is something you need to fix with backcolor.. :-)

I find it hard to believe there is no current way with the latest version to set the backcolor of cells at run-time, so any code that works I'll take at this point.

Eric



 

 

 

 

Martin Vasilev
Telerik team
 answered on 23 Sep 2010
8 answers
240 views
hi,
When I edit with GridView when the wizard does not update table
please help..
thankyou
Alexander
Telerik team
 answered on 23 Sep 2010
7 answers
530 views
I'm working on an inventory form and one of the (optional) fields is ReplacementDate. Obviously, for equipment that is still in service, there won't be a value for the ReplacementDate. Is there a way for either the RadMaskedTextBox (with a DateTime mask) or RadDateTime picker to handle a nullable DateTime natively, or do I have to use a numeric mask and handle the Validating event?
Elliott
Top achievements
Rank 2
 answered on 22 Sep 2010
1 answer
173 views
Hi,

i've just tested a bit and scrolled through one of my several gridviews that i am using in my application and...whooops...
i've got this error message here:

"Object reference not set to an instance of an object."
And this error occured in Telerik.Wincontrols.UI.

Attached you can find the stack trace:

"   bei Telerik.WinControls.UI.ItemScroller`1.HideToolTip()\r\n   bei Telerik.WinControls.UI.ItemScroller`1.UpdateOnScroll(ScrollEventArgs e)\r\n   bei Telerik.WinControls.UI.ItemScroller`1.scrollbar_Scroll(Object sender, ScrollEventArgs e)\r\n   bei Telerik.WinControls.UI.RadScrollBarElement.OnScroll(ScrollEventArgs args)\r\n   bei Telerik.WinControls.UI.RadScrollBarElement.CallOnScroll(ScrollEventType scrollType, Int32 oldValue, Int32 newValue)\r\n   bei Telerik.WinControls.UI.RadScrollBarElement.EndScroll(Int32 endValue)\r\n   bei Telerik.WinControls.UI.RadScrollBarElement.OnMouseUp(MouseEventArgs e)\r\n   bei Telerik.WinControls.RadElement.OnCLREventsRise(RoutedEventArgs args)\r\n   bei Telerik.WinControls.RadElement.OnBubbleEvent(RadElement sender, RoutedEventArgs args)\r\n   bei Telerik.WinControls.RadItem.OnBubbleEvent(RadElement sender, RoutedEventArgs args)\r\n   bei Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)\r\n   bei Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)\r\n   bei Telerik.WinControls.RadElement.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)\r\n   bei Telerik.WinControls.RadItem.RaiseBubbleEvent(RadElement sender, RoutedEventArgs args)\r\n   bei Telerik.WinControls.RadElement.RaiseRoutedEvent(RadElement sender, RoutedEventArgs args)\r\n   bei Telerik.WinControls.RadElement.DoMouseUp(MouseEventArgs e)\r\n   bei Telerik.WinControls.ComponentInputBehavior.OnMouseUp(MouseEventArgs e)\r\n   bei Telerik.WinControls.RadControl.OnMouseUp(MouseEventArgs e)\r\n   bei Telerik.WinControls.UI.RadGridView.OnMouseUp(MouseEventArgs e)\r\n   bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)\r\n   bei System.Windows.Forms.Control.WndProc(Message& m)\r\n   bei System.Windows.Forms.ScrollableControl.WndProc(Message& m)\r\n   bei Telerik.WinControls.RadControl.WndProc(Message& m)\r\n   bei System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)\r\n   bei System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)\r\n   bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)\r\n   bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)\r\n   bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)\r\n   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)\r\n   bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)\r\n   bei System.Windows.Forms.Application.Run(ApplicationContext context)\r\n   bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()\r\n   bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()\r\n   bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)\r\n   bei MediaCenter.My.MyApplication.Main(String[] Args) in 17d14f5c-a337-4978-8281-53493378c1071.vb:Zeile 81.\r\n   bei System.AppDomain._nExecuteAssembly(Assembly assembly, String[] args)\r\n   bei System.AppDomain.nExecuteAssembly(Assembly assembly, String[] args)\r\n   bei System.Runtime.Hosting.ManifestRunner.Run(Boolean checkAptModel)\r\n   bei System.Runtime.Hosting.ManifestRunner.ExecuteAsAssembly()\r\n   bei System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext, String[] activationCustomData)\r\n   bei System.Runtime.Hosting.ApplicationActivator.CreateInstance(ActivationContext activationContext)\r\n   bei System.Activator.CreateInstance(ActivationContext activationContext)\r\n   bei Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssemblyDebugInZone()\r\n   bei System.Threading.ThreadHelper.ThreadStart_Context(Object state)\r\n   bei System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)\r\n   bei System.Threading.ThreadHelper.ThreadStart()"

Is there a workaround for this particular problem?
Jack
Telerik team
 answered on 22 Sep 2010
7 answers
700 views
Hi,

I am showing comments in the grid .
now if comments are more than 20 lines i want that scroll bars be displayed inside the textbox cell of the gridview.

I do not want to use auto rowsize or word wrap. I there a way to show a scroll bar inside the text box cell

thanks,
Nikolay
Telerik team
 answered on 22 Sep 2010
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
PdfViewer and PdfViewerNavigator
CommandBar
ListControl
Carousel
GanttView
Diagram, DiagramRibbonBar, DiagramToolBox
Panorama
New Product Suggestions
VirtualGrid
Toolstrip (obsolete as of Q3 2010)
Label
AutoCompleteBox
Spreadsheet
ContextMenu
Panel
Visual Studio Extensions
TitleBar
SplitContainer
Documentation
Map
DesktopAlert
CheckedDropDownList
ProgressBar
MessageBox
TrackBar
Rotator
SpinEditor
CheckedListBox
StatusStrip
SyntaxEditor
Wizard
CollapsiblePanel
LayoutControl
ShapedForm
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
SmartPasteButton
+? more
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Jake
Top achievements
Rank 1
RBarnes
Top achievements
Rank 1
Iron
Iron
Rami
Top achievements
Rank 1
Iron
Veteran
Nathan
Top achievements
Rank 1
Kumeri
Top achievements
Rank 1
Iron
Veteran
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?