[CLOSED] Enable Buttons on Page Load

  1. #1

    [CLOSED] Enable Buttons on Page Load

    Hi,

    this is just out of curiosity,

    I am working with user permissions and therefore some buttons like delete-buttons are disabled.

    On page_load I am checking if the user has permissions, and if yes I am enabling that Button.

    I have seen that there are two ways to do that:

    Me.ButtonDelete.Enable()
    Me.ButtonDelete.Disabled = False
    Is there any difference between these two approaches?
    Last edited by geoffrey.mcgill; Mar 01, 2014 at 4:53 AM. Reason: [CLOSED]
  2. #2
    Quote Originally Posted by blueworld View Post
    Is there any difference between these two approaches?
    No, no really.

    In general, you should set Properties during Page_Load, and call Methods during DirectEvents/DirectMethods. There is some overlap of Property and Method functionality in Ext JS, which can cause confusion. This Enable() vs .Disabled is one of those overlaps.

    These members are even further complicated by the native ASP.NET .Enabled Property. If I remember correctly, there is some hard-coded logic deep inside the native WebControl Rendering event which forced us to work around this (defect?) problem by using .Disabled.

    Hope this helps.
    Last edited by geoffrey.mcgill; Feb 26, 2014 at 2:43 PM.
    Geoffrey McGill
    Founder

Similar Threads

  1. Grid load all records on firts page (on load)
    By equiman in forum 1.x Help
    Replies: 0
    Last Post: Nov 21, 2013, 6:18 PM
  2. Replies: 1
    Last Post: Dec 12, 2012, 3:21 PM
  3. [CLOSED] Stop treepanel to load data on page load
    By inayath in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 11, 2011, 10:17 AM
  4. how to load data to grid panel in page load
    By andylaiyongsing in forum 1.x Help
    Replies: 1
    Last Post: Apr 16, 2010, 10:27 AM
  5. How enable/disable buttons in CommandColumn og gridpanel
    By Satyanarayana murthy in forum 1.x Help
    Replies: 1
    Last Post: Feb 06, 2010, 10:00 AM

Posting Permissions