[CLOSED] Image Command Icon Visibility Issue

  1. #1

    [CLOSED] Image Command Icon Visibility Issue

    HI, I have just upgraded from 1.7 to v4 and going through the task of updating everything.
    I seem to be having an issue with one of my data grids show and hiding icons based on other column results which was working in 1.7.

    This is the basics of what I have.


    <ext:ImageCommandColumn runat="server" Width="80" Text="Complete">
            <ext:ImageCommand Icon="Tick" CommandName="Complete" />
        <PrepareCommand Fn="prepareCommand" />

    var prepareCommand = function (grid, command, record, row) {
        if (record.get("StageID") == 10) {
            command.hidden = false;
            command.hideMode = 'visibility';
        else {
            command.hidden = True;
            command.hideMode = 'visibility';
    Any help much appreciated.
    Last edited by fabricio.murta; Dec 18, 2018 at 10:54 AM.
  2. #2
    Hello @InHousePrint, and welcome to Ext.NET forums!

    I see the behavior you describe as not working for your code works in our Cell Commands online example, that looks very similar to the snippets you shared. Yet there are a couple points to be raised:

    - The C# code block you shared looks, except for the True word, to be essentially javascript. I don't think that block would run in C# code behind at all.
    - The very exception pointed above, the True keyword, is also the most clear difference between the code we have in our example from your block. In the online example we mentioned earlier, the command.hidden is given the true value, not True (not uppercase in the first character).

    So, it looks like there may be just a confusion on contexts, as far as I can see from the code you provided, it was a typo in javascript code that handles populating the grid panel.

    If that's still not the case, I'm afraid we'd need more details about the issue you're facing.

    Hope this helps!
    Fabrício Murta
    Developer & Support Expert
  3. #3
    Thankyou @fabricio.murta, sometimes just a fresh set of eyes helps, your are correct True does not = true.

    This fixed my issue,

  4. #4
    Hello @InHousePrint!

    Glad it was just a simple mistake and it helped out, and thanks for the feedback! We'll now mark this thread as closed, but you're welcome to open new threads when other issues arise.
    Fabrício Murta
    Developer & Support Expert

Similar Threads

  1. Replies: 1
    Last Post: Feb 20, 2015, 9:36 AM
  2. Replies: 5
    Last Post: Sep 02, 2014, 1:15 PM
  3. [CLOSED] [v 2.1] Issue with Image Command Handler in IE10
    By amitpareek in forum 2.x Premium Help
    Replies: 8
    Last Post: Apr 18, 2013, 6:03 AM
  4. Replies: 1
    Last Post: May 16, 2012, 12:57 PM
  5. Image Command problem
    By gayancc in forum 1.x Help
    Replies: 2
    Last Post: Nov 19, 2010, 6:57 PM

Posting Permissions