[OPEN] [#1250] [3.2.1] CelllDragDrop should override Enable property

  1. #1

    [OPEN] [#1250] [3.2.1] CelllDragDrop should override Enable property

    Support,

    I found that in this code p.Enabled=false does nothing. This is wrong in my opinion. I was required to cast to disable at the subclass level.

    I would recommend an Override at the CelllDragDrop level so that if i call p.Enabled, the override first calls super AND then enables/disables the EnableDrag and EnableDrop property automatically.

    Thanks,
    /Z


                    foreach (Plugin p in GridView1.Plugins)
                    {
                        if (p.ID == "CellDragDrop1")
                        {
                            p.Enabled = false;
                            ((CellDragDrop)p).EnableDrag = false;
                            ((CellDragDrop)p).EnableDrop = false;
                        }
                    }
  2. #2
    Hello, can you provide a full test case?

    I am not sure you are running this during a PostBack or during the initial Page_Load() event (if WebForms).

    EDIT: I could reproduce it on the example Drag and Drop from Cell to Cell within the same GridView just by adding Enabled="false" on the plugin definition. I'll continue investigating it and will get back with a proper reply in a while.
    Last edited by fabricio.murta; Feb 02, 2016 at 8:04 PM.
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Form load
    /Z
  4. #4
    Hello @Z, and thanks for the reply!

    This is actually an error. This Enabled setting is inherited from System.WebControls and actually has nothing to do with the plugin. The plugins do not have an Enabled setting at all.

    But you got a good point, having this option on intellisense is very misleading and we should choose between hiding this property or handling it properly.

    Seems that just allowing an enabled: false go to ExtJS part is not enough, at least for a number of plug ins (the problem does not limit to CellDragDrop but any other plug ins).

    So we will have to decide to either hide it properly or implement handlers for every plug in to deal with the disabled state.

    For this I've logged the issue #1250 and am associating this thread to it.

    Thanks for the report!
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 3
    Last Post: Sep 15, 2017, 8:46 PM
  2. Replies: 3
    Last Post: Sep 13, 2015, 8:41 AM
  3. Replies: 6
    Last Post: Feb 24, 2014, 10:48 AM
  4. Replies: 9
    Last Post: Jan 27, 2014, 10:13 AM
  5. Replies: 4
    Last Post: Oct 24, 2013, 3:54 PM

Posting Permissions