Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
4165
How to check if Editor.SupportsSelectableText if not using an editor
posted

Hi,

I know that may sound silly, but I have a grid and when they type in a cell I need to know if it I check a few things. Now if that row has a checkbox, and they hit spacebar while the cell is selected instead of just checking the box with the mouse:

Selection related properties (SelText, SelStart and SelLength) are not supported if the underlying editor used for editing doesn't support selectable text. Here is my IF statement

ug.ActiveCell.CanEnterEditMode && ug.ActiveCell.IsInEditMode && ug.ActiveCell.SelText.Length == ug.ActiveCell.Text.Length

I found an article that said I should check Editor.SupportsSelectableText but I am not setting an editor. So how can I check to avoid this error?

Thanks.