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
40
Remove Column from Column Moving Dialogue
posted

I have set allowMoving property of a column to false. I cannot move it by mousse drag. But it still appears in column moving dialogue. How can I remove it from column moving dialogue.

Parents
No Data
Reply
  • 3995
    Offline posted

    Hello Adeel Ahmed,

    Thank you for posting into our community!

    You are right we don't have an option to allow hiding of nodes from the column moving dialog. But you can use the API of the tree (the content of the column moving dialog is actually an igTree).

    So to remove a node, you can bind to event of column moving - movingDialogContentsRendered and call removeAt method of the igTree for the nodes you want to remove.

    It should be something similar to this:   

      {
        name: "ColumnMoving",
        columnSettings: [
         { columnKey: "idOfTheColumnYouWantToHide", allowMoving: false }
        ],
        movingDialogContentsRendered: function(evt, args){
         var gridId = args.owner.element[0].id;
         args.movingDialogElement
          .find("#" + gridId + "_dialog_tree")
          .igTree("removeAt", "idOfTheColumnYouWantToHide");
        }
       }

Children