Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hello,

                                    Currently I am using a 'RepositoryItemTextEdit' for one of the columns in GridControl (GridView). I want to select(highlight) only text from 0 to n and NOT all the characters for the string.

                                    I am aware that we can do this for 'TextEdit' by using select(0,n) method. Also, I am aware that for GridControl we can use 'currentView.ActiveEditor.SelectAll()' to select the whole text. I understand that for 'BaseEdit' we cannot have the Select(0,n) method since BaseEdit can be anything PictureEdit, TextEdit, ImageEdit etc.

                                    Kindly, suggest a way to accomplish this or correct me If I am wrong.

                                    Thanks.

                                0

                                Hi Jennie,

                                Thank you for contacting us.
                                Do you want to highlight charters only in the active editor or in all cells?
                                In the first case, your approach is correct. You need to cast the ActiveEditor to the TextEdit and call its Select method.
                                If you need to highlight text in all cells, you cannot use editor's methods, because an inplace editor exists only in the focused cell. Other cells are painted directly on the GridControl. In this scenario, you need to use the Custom Draw capabilities.

                                Does this information help?

                                See Also:
                                Why doesn’t the RepositoryItem have the methods that the editor has?
                                How to highlight a text in cells

                                Thanks
                                Dimitros

                                0

                                Hello,

                                Thanks for the response. It works fine now. I was missing the Casting to "TextEdit" part and then use Select(0,n) method.

                                Thanks.

                                0

                                You're welcome, Jennie :)

                                Dimitros

                                To start a chat you should create a support ticket


                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners