locked
html client show element in collection based on other column RRS feed

  • Question

  • In the HTML client, I am trying to hide/show a button in a table grid based upon data in another column.  Anyone get this to work?

    Friday, July 11, 2014 5:05 PM

Answers

  • I figured it out. :)

    I added a button to my collection:

    In the postrender method:

    myapp.EditAccessRequest.ShowProductOptionsPopup_postRender = function (element, contentItem) {
        var entity = contentItem.value;
    
        function hide() {
            if (entity.Product.HasOptions == true) {
            } else {
                $(element).find("a").css({"visibility":"hidden"});
            }
    
        }
        hide();
        entity.addChangeListener("HasOptions", hide);
    };

    This does exactly as I needed!  Hope this helps someone else!

    Friday, July 11, 2014 6:09 PM