[CLOSED] Change property ComponentDirectEvents.Parent from internal to protected

  1. #1

    [CLOSED] Change property ComponentDirectEvents.Parent from internal to protected

    I'm trying to create my own GridPanel with a custom DirectEvent by inheriting from Ext.Net.GridPanelBase and adding a custom GridPanelDirectEvent-property. To make the class more extendable in the future I'm using generics to set the type of the DirectEvents-property

    public class MyGridPanel<T> : Ext.Net.GridPanelBase where T : TemplateGridPanelDirectEvents, new()
    {
         public T DirectEvents {get; set;}
    }
    
    public class TemplateGridPanelDirectEvents : GridPanelDirectEvents
    {
      ...my new DirectEvent..
    }
    When you create a new instance of GridPanelDirectEvents the constructor expects observable Parent. Since I'm using generics I can only create my instance with a parameterless constructor. My idea was to set Parent after I created my instance but unfortunately the property have an internal set so I can't set it in my class. Would it be possible for you to change it from internal to protected?

    public partial class ComponentDirectEvents : BaseItem 
    {
             public virtual Observable Parent
            {
                get;
                internal set; // <- can you please change this to protected?
            }
            ...
    }
    Last edited by Daniil; Jun 04, 2012 at 12:51 PM. Reason: [CLOSED]
  2. #2
    Hi,

    Thanks for the suggestion.

    Please update from SVN.
  3. #3
    I'm afraid you changed the property in the wrong class.

    I ment the Parent-property in: public partial class ComponentDirectEvents : BaseItem

    declared the file /Ext.Net/Event/DirectEvents/Component.cs
  4. #4
    Please update again.
  5. #5
    Thank you. Everything works fine now.

Similar Threads

  1. [CLOSED] Change custom property of a window
    By romeu in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Mar 06, 2012, 9:55 AM
  2. [CLOSED] Change parent of item, or dockable panel?
    By peter.campbell in forum 1.x Legacy Premium Help
    Replies: 5
    Last Post: Oct 26, 2011, 8:51 AM
  3. Replies: 16
    Last Post: Jun 24, 2010, 2:41 PM
  4. [CLOSED] Change Readonly property on the client
    By sharif in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Feb 22, 2010, 12:10 PM
  5. Change to AutoLoad Property
    By geoffrey.mcgill in forum Open Discussions
    Replies: 14
    Last Post: Apr 22, 2009, 5:55 AM

Posting Permissions