The following is for RapidSpell Desktop .NET v3.7 up and DevExpress 6.x up. To use RapidSpellAsYouType with XtraGrid it's necessary to add the RapidSpell_DevExpressAdapter_Glue class (attached at the bottom and also in the demos) to your project, and then to set the ColumnEdit property for each Column to the new editor type AYTTextEdit (which derives from the regular DevExpress text editor). Most of the work can actually be done through the designer. Please click here for an article on MemoExEdit and MemoEdit Demos The trial/full download for RapidSpell Desktop .NET includes current C# and VB.NET demo Visual Studio projects for DevExpress controls. Step by step instructions 1. Add the RapidSpell_DevExpressAdapter_Glue class and references to Keyoti.RapidSpell.dll and Keyoti.RapidSpellMDict.dll to your project. 2. If necessary add a GridControl to the form, and set the DataSource. 3. Compile project - this is necessary to ensure that the ColumnEdit property includes the new spell checker editor type in the designer. 4. Add Keyoti.RapidSpell.ThirdParty.DevExpress6.Glue.RepositoryItemAYTTextEdit.InitRapidSpellAsYouType() to Form constructor, after the InitializeComponent() call - this creates the spell checker and configures it. For XtraGrid, it is necessary to have one static instance of the spell checker. 5. Add this line Keyoti.RapidSpell.RapidSpellChecker, Keyoti.RapidSpell to existing licenses.licx file in the project. 6. Add a ContextMenu control to the form, this will be used to disable the default XtraGrid context-menu in the text editor. At present this is necessary, otherwise the DevExpress CM will override the spell checker's. 7. Open the property editor and set the ColumnEdit property (under Columns)
8. Under "In-place Editor Repository" set repositoryItemAYTTextEdit.ContextMenu to ContextMenu1 9. Close the designer and run the project! Underline Persistence In the above screenshot an 'e' is painted in the top right in cells which have spelling errors, and a straight underline is used to highlight errors. The glue class allows you to choose between persistent underlines or an 'e', and also wavy underlines. NOTE: If you do not wish to use the designer, the same effect as the above can be acheived using this code: RepositoryItemAYTTextEdit texteditor = new RepositoryItemAYTTextEdit(); texteditor.ContextMenu=new ContextMenu(); gridControl1.RepositoryItems.Add(texteditor); gridView1.Columns[0].ColumnEdit = texteditor; gridView1.Columns[1].ColumnEdit = texteditor; which should be placed in the constructor of the form. |