Important Update: Community URLs redirect issues are partially resolved. Learn More. .

cancel
Showing results for 
Search instead for 
Did you mean: 

CSS Code to Hide Add new

Anonymous
Not applicable

I have implemented a piece of code to hide add new button from a grid, this is a piece which will only hide Archer Add new from grid like Cross-reference.

I just want to know is there any other custom object practice which can achieve this same objective.

1 ACCEPTED SOLUTION

Accepted Solutions

Arun.Prasad
Advocate II

Here is the code you might need:

<script type="text/javascript">
$(document).ready(function(){
$('#master_########').hide(); //Replace #'s with appropriate content
});
</script>

View solution in original post

7 REPLIES 7

Ilya_Khen
Champion III

.hide() and .show() JQuery functions.

Anonymous
Not applicable

yes, we can do that but I have achieve it through CSS also.

<style>
    /*Hide Add New from Any Grid this a sample code*/
    #put your Id here without removing hash{
        position: absolute;
        left: -600px;
    }

    .ml-FldCnt lo_49604 ml-BrdBottom {
        position: relative;
    }

    .ml-command-item-divider subSection-ml-command-items-div First {
        position: relative !important;
        left: -600px !important;
        display: none;
    }
</style>

Ajeet,

 

As Ilya Khen‌ suggested, it is much more easier to go with hide(); & show(); functions. It will reduce your lines of code.  All you need is just the ID of the button.

Arun.Prasad
Advocate II

Here is the code you might need:

<script type="text/javascript">
$(document).ready(function(){
$('#master_########').hide(); //Replace #'s with appropriate content
});
</script>

Anonymous
Not applicable

Yes that is implemented also.

Anonymous
Not applicable

one is solution from CSS and second one is from Js, both are working perfectly.

Sounds good then..