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
2077
Changing the EditorComponent in a cell before edit
posted

Hi,

Based on a value from a different cell, i need to change the way data is entered in a cell: free text or a text selected from a combo. Is this achievable, and if it is, how can it be done?

I have tried, in BeforeEnterEditMode event, to set the EditorComponent to the combo or to null, but I get and InvalidException "Can't access SelectionStart unless the Editor is in edit mode." The full stack trace can be found in the attachment.

Thanks.

Emanuel

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

    There's no need to change the EditorComponent for the entire column. You can set it in a cell. You can also set the Style property on the cell.

    It's hard to say what the best approach is here, since I don't know much about your requirements. But I would try using the InitializeRow event. You can examine the value of the "other" cell and based on that value, you can set the Style and/or EditorComponent or ValueList of the cell you want.

Children