Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
Hide/Unhide Column funktion
posted

Hi there,

in my project i use a navigation bar for filtereing the grid-content by the name of  a habour. I try to hide the column with the harbour-names when a  harbour is selected und unhide it when "all" is chosen:

function showHabour(hafen){
if(hafen == "Alle"){
                $("#MyGrid").igGridFiltering('filter', ([
                { fieldName: "Harbor", expr: hafen, cond: "doesNotEqual"}
 
                ]));
                $("#MyGrid").igGridHiding([{ columnKey: "Harbor", hidden: false }]);
            }
            else{
                $("#MyGrid").igGridFiltering('filter', ([
                { fieldName: "Harbor", expr: hafen, cond: "contains"}
 
                ]));
                $("#MyGrid").igGridHiding([{ columnKey: "Harbor", hidden: true }]);
            }
}
unfortunately this does not work...
can anybody help me whith this?

Best Andy
Parents
  • 110
    posted

    sorry, some parts of my code seeme to be hidden in the window above:

    if(hafen == "Alle"){
          $("#MyGrid").igGridFiltering('filter', ([{ fieldName: "Harbor", expr: hafen, cond: "doesNotEqual"}]));
          $("#MyGrid").igGridHiding([{ columnKey: "Harbor", hidden: false }]);
         }
       else
        {
          $("#MyGrid").igGridFiltering('filter', ([{ fieldName: "Harbor", expr: hafen, cond: "contains"}]));
          $("#MyGrid").igGridHiding([{ columnKey: "Harbor", hidden: true }]);
         }
    }
Reply Children
No Data