Removing buttons from QueryWebPart

LabKey Support Forum (Inactive)
Removing buttons from QueryWebPart Will Holtz  2017-03-15 10:55
Status: Closed
 
If I make a wiki page with the source:

<div id="MyQuery" />
<script>
new LABKEY.QueryWebPart({
        renderTo: 'MyQuery',
        schemaName: 'core',
        queryName: 'users',
        buttonBar: {
            items: []
        }
    });
</script>

Then I'd expect that I don't get any buttons. But I do -- I get:
Grid Views
Reports
Charts
Insert
Delete
Export
Print
Paging

But if I change the items line to:
items: [{}]

Then I don't get any buttons. Obviously, I am not in need of a fix, but maybe I can prevent someone else from spending 30 minutes figuring this out.

-Will
 
 
Jon (LabKey DevOps) responded:  2017-03-15 11:21
Hi Will,

Alternatively, you can use the value "buttonBarPosition: none" to also remove the buttons.

For example:

<div id="MyQuery" />
<script>
new LABKEY.QueryWebPart({
        renderTo: 'MyQuery',
        schemaName: 'core',
        queryName: 'users',
        buttonBarPosition : 'none'
    });
</script>

Regards,

Jon