Removing Export to Excel link

May 22, 2012 at 9:17 AM

Hi,

Does anyone know if there is a quick way to remove the Export to Excel link and to shift the search box so it aligns with the left hand side of the results pane?

Thanks

Ed

Coordinator
May 22, 2012 at 10:29 AM

Hi,

You need to edit the template file:
C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\UsersADBrowser\Browser.ascx
and add the attribute Visible="false" in ASP.NET-control <asp:LinkButton ID="btnExport" />. This will remove the link "Export to Excel" in the user list.

To align the search box is simply edit HTML-code in template Browser.ascx


May 22, 2012 at 12:45 PM

Thanks for that. Just about got the web part looking how I want it. Sorry to be a pain, but where are the values to remove the margin around the outside of everything and to adjust the width? I've tried changing several values but nothing seems to be taking effect.

Thanks

Coordinator
May 22, 2012 at 1:48 PM

Have you tried to change the values ​​of css-styles?

<style type="text/css">
#spltContainer {
	height: 600px;
	margin: 1em 3em;
	border: 1px solid #e0e0e0;
}
...
</style>
This web part fills the full available width of web part zone (by default width 100%).

May 22, 2012 at 2:40 PM

Apologies I completely missed trying to add a width value into the CSS there. Yes that worked and I managed to get my head around the rest of the code to get it looking how I wanted. This is a very good web part.

Thank you

Ed

May 22, 2012 at 3:14 PM

Hi,

One last question. Is there any way to make it load with the list (and possibly the Total) blank when the page is loaded?

Ed

Coordinator
May 22, 2012 at 5:05 PM

Hmm, I hope that I have correctly understood the question.

No, this version of the Web Part renders user list on page synchronously.

Sep 6, 2013 at 12:16 PM
Edited Sep 6, 2013 at 12:17 PM
yurax wrote:
Hi, You need to edit the template file:C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\TEMPLATE\CONTROLTEMPLATES\UsersADBrowser\Browser.ascxand add the attribute Visible="false" in ASP.NET-control <asp:LinkButton ID="btnExport" />. This will remove the link "Export to Excel" in the user list. To align the search box is simply edit HTML-code in template Browser.ascx
Having added Visible="false" for Show employees of all child organizational units (sorry dont remember ID) - it did not do the trick. What else should I do to hide the one mentioned?

Thanks.
Coordinator
Sep 6, 2013 at 5:42 PM
https://usersadbrowser.codeplex.com/discussions/430590#post991917

You must use this html-code for hiding checkbox:
<span style="visibility:hidden;display:none"><asp:Checkbox ... /></style>