[CLOSED] [1.0] Hide GridCommand in CommandColumn

  1. #1

    [CLOSED] [1.0] Hide GridCommand in CommandColumn

    Hi,

    In that post (http://forums.ext.net/showthread.php?2230-CLOSED-How-to-Hide-Show-CommandColumn-for-Each-Row-Based-on-record.data) it's explained how to hide a GridCommand via Prepare command.

    But, how can I do the same thing in code-behind?

    Thanks in advice.
    Last edited by Daniil; Jun 10, 2011 at 10:16 AM. Reason: [CLOSED]
  2. #2
    Hi,

    It is not supported in the code behind because UI are built on the client side only
    Why do you need to do it in code behind?
  3. #3
    Hi,

    I see. I want to show/hide GridCommand depending some roles ("Administrator","User",...).
    Those roles are managed with .NET Membership.

    Do you know other way to do that?
  4. #4
    Hi,

    Why do you need to hide it? I think that it is better to generate different set of commands (Commands collection of CommandColumn) depending on the role
  5. #5
    Well, yes I know what do you want to mean, but it's not only a role, there are some factors that are involved too.
    For example, there are some rows that are verified* (in that case can't be deleted and edited), other rows must have a score (other gridcommand must be showed/hided depending that)...


    *verified is a boolean db field.
  6. #6
    Well, in this case, add separate field to the binded data
    Define value for that field in the code behind (show or hide command), in the prepare js method show/hide command depending on that field
  7. #7
    Ok, I think the same. Well I'm going to work in that, thanks for fast reply!

    SOLVED!

Similar Threads

  1. [CLOSED] Problem When try to hide a MenuCommand from a GridCommand
    By egdev in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Aug 16, 2012, 4:01 PM
  2. Replies: 1
    Last Post: Dec 28, 2011, 6:36 PM
  3. [CLOSED] Hide GridCommand based on data
    By Justin_Wignall in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Aug 16, 2010, 10:28 AM
  4. Hide gridcommand on serverside
    By mário in forum 1.x Help
    Replies: 0
    Last Post: Jul 12, 2010, 4:40 PM
  5. Replies: 2
    Last Post: Mar 04, 2009, 4:28 PM

Posting Permissions