.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Conditionally Change Folder Icon in document library view (SP 2007)

Posted By:      Posted Date: October 16, 2010    Points: 0   Category :SharePoint

Hi All,

How can I change the folder icon in the default document library view?  The catch is, I don't need to do this across the board, instead, I need a custom folder icon based upon the individual folder's properties.

I'm aware of the file ..\Web Server Extensions\12\TEMPLATE\XML\DOCICON.XML, but that's not what I need.

My initial thought, was to find the page that sharepoint uses as the template, find the <img> src attribute, and chnage it from


to something like


my GetIcon.aspx page would then look up the folder's properties, and return the expected .gif file.  However, I don't know which file is used.


View Complete Post

More Related Resource Links

When try to open a folder in a moss 2007 document library in Explorer View, the folder does not open


When try to open a folder in a moss 2007 document library in Explorer View, the folder does not open.

I am using IE7 and the path of the folder does not contains more than 100 characters.

Also it opening on few on the machines which has IE7.


How to change the folder icon dynamically based on the name of folder in shared document library


I have created visual webpart ,through this webpart i am creating the folders dynamically in shared document library.

here my thing is if i create folder with specific name,want to set custom icon instead of default icon

please any one help me on this.


Advanced thanks


When i click on any other folder in the document library that will navigate to default view of DL?



I have document library with having some folder in the same ,i have displayed my library in the page as Treeview, so when i click on any of the folder in the library i need to navigate allitems.aspx page i.e default view page of the document library ,the document library having views.Suppose when i am in other view i have selected folder from library treeview folder is changing but view not navigate to default view.

pls help 


How can I change the height of the rows in a document library webpart view to minimize the space bet

In SP2010 documents listed in a document library view (attached as webpart) are quite far from each other (height of each row is too big). How can I change the height that spaces between the documents are limited to a minimum, hence more documents are visible on my screen. (e.g. if I have many documents in my document library and add a webpart to my page that should show all documents, I would see more documents if the height of the row would be smaller (e.g. 16px) and spaces minimized. Moreover how can I make a smaller height for each row the default height?

Unable to open pdf from document library MOSS 2007


When I click on a pdf document uploaded in a document library it comes up with a blank page. 

I guess it's trying to open pdf on the browser. I turned off "Display PDF in browser " option in Adobe Preferences, but it doesn't help, same issue.

I tried other browsers too, it's the same issue.

I am able to open all other pdf files local to my machine fine.

I am using IE 8 on my machine (Windows 7) and the Sharepoint server is MOSS 2007.



Can i Map to external link from document library folder



Is There any one know how to link document library folder is to external site 



When the user want click on document library that should be navigate default view



I have document library which is having folders,the document library i have displayed as tree view in the left side of the page.

Here Document library having views,suppose i have selected one view on the document library it is navigating the particular view that is good but when i am trying to click document library folder still the page in same view do not navigate the default view .

I need when ever i click on any of the folder in document library that should navigate defualt view ,could you please help me on this.

Really its need urgent...


Sharepoint Workflow To Shoot Email Only When Folder Is Created In Document Library

Hi, Can anyone help me with the below issue, I am facing this from so long and didn’t figure out solution yet for the same. :( I want to send an email through SharePoint designer workflow only when a folder is created in document library (not file uploaded/updated event). Please provide me solution about how I can achieve this through SharePoint designer as don’t have enough coding acquaintance.

overwrite the files in document library from Explorer View ?

Hi Everyone, Suppose I have a document library which can be opened using the explorer view, what happened if someone uploads to this library by drag n drop into the library with same filename? What would be the final story of the file which is overwritten through drag n drop from Explorer view ? Thanks./* Infrastructure Support Engineer */

Converting Word Documents library to PDF document library in SharePoint Server 2007

My project requires me to create an event reciever such that when a word file is added to one library the same content pdf file should be added to other library also when a word file is updated,edited or checked in the respective pdf file in other document library should be replaced by a new pdf file with the edited word content . Can we do this in Sharepoint 2007 I have seen this can be done in Sharepoint 2010 http://msdn.microsoft.com/en-us/library/ff181518.aspx

New / Upload / Actions / Settings / View menus on a document library are hidden

I have a Document library. On the View Page (All Documents) for the Document library, I do not see the menu bar with the "New / Upload / Actions / Settings / View" menus. It looks like one of the users with owner permissions did something to cause this behavior. No custom code exists on the page. I am not sure how this menu bar can be hidden. Can someone please clarify. I am a site collection administrator.

How to remove Title, Created By etc from Document library view?

How to remove title of columns of the Document Library/Links/Annoucements so that only WebPart Title and items are displayed?Kenny_I

Customizing Send To Other Location Functionality for a document library item in Moss 2007

Hi All i have a requirment to customize the Send To Other Location funtionality. while using OOTB Send to Other Location option for a document library item we have  selection like Prompt the author to send out updates when the document is checked in? <input id="ctl00_PlaceHolderMain_ctl01_ctl01_RadShouldUpdateYes" name="ctl00$PlaceHolderMain$ctl01$ctl01$ShouldUpdate" type="radio" value="RadShouldUpdateYes" /><label for="ctl00_PlaceHolderMain_ctl01_ctl01_RadShouldUpdateYes">Yes</label> <input id="ctl00_PlaceHolderMain_ctl01_ctl01_RadShouldUpdateNo" checked="checked" name="ctl00$PlaceHolderMain$ctl01$ctl01$ShouldUpdate" type="radio" value="RadShouldUpdateNo" /><label for="ctl00_PlaceHolderMain_ctl01_ctl01_RadShouldUpdateNo">No</label> how we can set this option in my custom coding based on the user selection. i am not able to understand the functionality of the above option. can any one please explain the above option and let me know how to set this option programmtically in my custom code.   Thanks in Advance  muthu

Opening office Documents in MOSS 2007 document Library.... You get a prompt to login...

*Sigh* i know i'm not the only one who has experienced this.   You have a Moss 2007 farm on your Server... yet you have employees and users who use Office 2003 products (word, excel, power point) Everything is installed correctly you yourself use office 2007. but don't post office 2007 docs.. just open the docs that people already post (2003 stuff) Computer Environment si am using....It does this in both Environments1st one Windows Vista Ultimate Updated Service Packs Office 2007 All update Serice Packs Internet explorer 7.0 2nd Environment Windows XP all updated Service Packs Office 2007 All updated Service Packs Windows Internet Explorer 7.0 Server Environment Moss 2007 with SP1 installed Microsoft 2003 Server No matter what happens.... when i try to open up a word documents or excel or anything.. when using office 2007..... it ask me for a login...I believe there was an article about correcting something in the registry or something.. can someone give me detail bulleted / bold instructions... this has been bothering me for a while.

Document Library Filtered by Document Type in Sharepoint 2007

Dear Friends, I have a doucment library where we uploade the word document, but when I uploade the document that time it show the all file type, Can I filtered those file type in sharepoint 2007, Its very urgent for me.  

Sharepoint 2007 - 80GB Documents in 1 document library

Hi, My customer wants 'customer docs' in SharePoint. It is now stored on several disks and wants to move it to SharePoint 2007(!). It needs to go into a folder structure.....I'm now investigating the information that needs to move to SharePoint and it turns out a quick scan resulted in 210.000 documents with a total volume of 80GB. Off course this is raw data and thus containing archives, zips, access databases and a lost movie and the like (just like any normal network drive :-)). When I look at the limits and best practices: no folder should contain more then 2.000 items (OK) no doc lib should contain more then 2.000.000 items (more then OK) no file should be larger then 2GB (OK - we set it to a max of 150MB) It is all fine but my concern is the shear size of the total load. Let's say they don't migrate 80GB but 30-50GB. My Question: can a single MOSS 2007 document library hold this kind of documents and total size? What does this mean for overall performance, backup, search indexing, crawling etc etc?  Thnx for any tips!

Querystring to determine what Document Library Folder's files to list?

First of all, any webpart that alllows you to list documents in a particular folder of a Document library? Second, possible to pass what folder to list via a query string to  that webpart ? Thanks.
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend