Without any styling a GridView control's header will display the text in the center of the column. If you want the header text to be aligned to the left of the column, it can be tricky and not very intuitive to accomplish this.
There are several places (markup not code-behind) in the grid where you can specify a CSS class to apply to the header. The attribute is called HeaderStyle-CssClass. This attribute is applicable to the asp:GridView node, or the individual Column nodes (i.e. asp:TemplateField, asp:BoundField, etc.). There is also a HeaderStyle node which as a CssClass attribute that would mean the same thing. However, any alignment styling will not work unless the HeaderStyle-CssClass attribute is set on the individual Column nodes. So, you have to specify the header's CSS Class for each column. To me this is counter-intuitive, but appears to be the only way to get a header to align a certain way.
Friday, June 28, 2013
Friday, June 7, 2013
SharePoint 2010 will not open PDF files by default
By default, if you click on a PDF file in a document library, the file will not open in a browser. Instead, a dialog box will show up prompting you to save the document to your hard drive. This is supposed to "protect" the user from opening up malicious files. Obviously, if you deal with PDF a lot, you can't expect people to download the file every time they want to edit or just look at it. It pretty much defeats the entire purpose of the document library. So, we have to "loosen up" this restriction. Unfortunately, Microsoft does not provide a way to only "loosen up" this restriction for specific file types. It's all or nothing. So, follow these steps:
- Central Admin
- Manage Web Applications
- Select your web application, and click General Settings / General Settings in the Web Applications ribbon.
- Select the Permissive setting in the Browser File Handling section.
Tuesday, June 4, 2013
View ALL user profiles in SharePoint 2010
From Central Admin, if you navigate to Manage Service Applications, User Profile Service Application, and then Manage User Profiles, it appears that you can only search for specific profiles using the provided "Find Profiles" box. However, sometimes you want to see a list of all profiles when looking for something. Just type the name of the domain in the box, and all profiles tied to an account in that domain will pop up.
Subscribe to:
Posts (Atom)