Hi,
Can you please provide me with a C# sample, describing how to get the currently selected (highlighted) text, start position and length from the focused cell in a Grid.
Basically, I’m looking for exactly the same properties as provided by the TextEdit component: “SelectedText”, “SelectionLength” and the “SelectionStart”, but I cannot see the properties in the GridView.
Many thanks
Stephan
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Hello Stephan,
These properties are available only on the editor level. We create an editor if a cell is activated. In the ShownEditor method, you can get the current editor, and use these properties. You'll find a sample in the RepositoryItemBouttonEdit issue.
Thank you, Marina
Marina,
many thanks for the answer. I have reviewed the mentioned sample, but it seems that the information (SelectedText, SelectionLength and SelectionStart) is only available on the “ShownEditor” event which does not help, since at that time the text has not been selected yet.
The GridView.MouseUp event is probably the right event to get the selected text details, but it seems that the property is not accessible on this event.
I appreciate if you could check again and revert.
Many thanks
Stephan
Hello Stephan,
It's unclear what functionality you wish to implement. Could you please clarify your task in greater detail? The following article may be helpful:<kblink id="A332">
Thank you, Marina
Marina,
many thanks for the reply. I have already looked into the sample you mentioned, but it does not provide the necessary information. Attached is a pdf document, outlining the requirements more detailed.
appreciate your reply.
Thanks
Stephan
Hello Stephan,
I'm afraid we don't have any event that will allow you to track changes in the text selection. However, your are able to implement this functionality yourself. Please review my sample.
Thank you, Marina
Marina,
many thanks for the reply, this solves my problem.
Best regards
Stephan