The following code hides the Insert New Row functionality, but Import Bulk Data is still accessible.
<div id="MyQuery" />
<script>
new LABKEY.QueryWebPart({
renderTo: 'MyQuery',
schemaName: 'core',
queryName: 'users',
showInsertNewButton: false,
buttonBar: {
includeStandardButtons: true,
}
});
</script>
Is that intentional?
-Will |
|
Jon (LabKey DevOps) responded: |
2017-03-15 14:50 |
Hi Will,
I'm actually not seeing the Import Bulk Data option using your code when I tested this in Trunk, 17.1, 16.3, and 16.2
All four versions of LabKey show no Insert button or Import Bulk button when focused on the core schema using the users query.
Are you running an older LabKey build by chance?
Regards,
Jon |
|
Will Holtz responded: |
2017-03-15 16:03 |
Hi Jon,
I'm sorry, swear I checked that repo with the users table and it behaved as I described, but now I'm not seeing it either. Maybe I didn't refresh.
Please try this on v16.3:
Make a new list, Mylist, then:
<div id="MyQuery" />
<script>
new LABKEY.QueryWebPart({
renderTo: 'MyQuery',
schemaName: 'lists',
queryName: 'MyList',
showInsertNewButton: false,
buttonBar: {
includeStandardButtons: true,
}
});
</script>
thanks,
-Will |
|
Jon (LabKey DevOps) responded: |
2017-03-15 16:22 |
Thanks Will,
Now that does display what you described in Trunk.
I think this might be a bug since we do have something called "showImportDataButton" which should be the thing that allows the button to appear. But when trying to set that to false, it gets ignored.
I'll get a bug made on this and looked into further.
Regards,
Jon |
|
Jon (LabKey DevOps) responded: |
2017-03-15 16:28 |
|
|
Jon (LabKey DevOps) responded: |
2017-03-28 17:43 |
Hi Will,
We added a new option for 17.2, which is to have a showImportDataButton. This will allow you to hide the Bulk Import button, so you can hide inserting new things by doing both:
<div id="MyQuery" />
<script>
new LABKEY.QueryWebPart({
renderTo: 'MyQuery',
schemaName: 'lists',
queryName: 'MyList',
showInsertNewButtonL false,
showImportDataButton: false,
buttonBar: {
includeStandardButtons: true,
}
});
</script>
I've tested this on Trunk and confirmed that it does work.
Regards,
Jon |
|
Will Holtz responded: |
2017-03-28 17:53 |
Looks good -- thanks!
-Will |
|
|
|