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
65
How to reuse a single control instance an editor?
posted

What's the best way to reuse a cell editor?
I have a usercontrol (with heavy memory use, and slow loading) that I want to use as an editor, but I only want to use one instance of this usercontrol. How can I reuse this editor for every cell in the same column?

  • 932
    posted

    I think specifying field.Settings.EditorType = typeof(MyCustomeEditor); will use only one instance of it.

    If it doesnot then may be you can implement singelton pattern for your custom editor so that only one instance is created!