project server 2010 pwa control existing ribbon functionality (enable / disable) RRS feed

  • Question

  • Hello all,

    What would be the best way to enable or disable an exisitng ribbon button as for the "remove task" button at the tasks page

    due to a row checked event. I have written the logic to capture that event i then run my own logic and if it comes out true

    i now want to disable the "remove task" button although it enabled. Regarding that where can i find the javascript logic for the existing ribbon buttons

    , i have a feeling it is built inside the project grids js files of the projectserver js file.


    aric katz
    Thursday, October 28, 2010 2:05 PM

All replies

  • Dear Aric,

    One workaround is that you can do it by adding javascript to your masterpage to remove "Remove Task" from PWA Ribbon, for example;

    <script type="text/javascript">
            var SrchElement = document.getElementById("s4-searcharea");
   = "none";
            if ( != -1)

                var SubmitElement = document.getElementById("Ribbon.ContextualTabs.TiedMode.Home.Sheet.SubmitMenu-Large");
    if (SubmitElement != null)
       = "none";       
    SubmitElement = document.getElementById("Ribbon.ContextualTabs.TiedMode.Home.Sheet.SubmitMenu-Medium");
    if (SubmitElement != null)
       = "none";       
        SubmitElement = document.getElementById("Ribbon.ContextualTabs.TiedMode.Home.Tasks.RemoveTask-Large");
    if (SubmitElement != null)
       = "none";
    SubmitElement = document.getElementById("Ribbon.ContextualTabs.TiedMode.Home.Tasks.RemoveTask-Medium");
    if (SubmitElement != null) = "none";


    Hope this help!



    Maaz Ibrahim
    Thursday, June 23, 2011 9:47 AM
  • Thanks for the reply Maaz,

    I actually found a cleaner workaround, using the C# code = trimbyid that i can check for the logic that i am interested in

    and then use the line of code accordingly. Yet, this is still lacking the disabled view i was looking for.

    aric katz
    Thursday, June 23, 2011 3:18 PM