123ArticleOnline Logo
Welcome to 123ArticleOnline.com!
ALL >> Computer-Programming >> View Article

Sharepoint Customization With Familiar Sharepoint Developers

Profile Picture
By Author: Dylan Rodriguez
Total Articles: 131
Comment this article
Facebook ShareTwitter ShareGoogle+ ShareTwitter Share

In Sharepoint developers can customize pages on the site if they add or change Web Parts. It enables developers to enhance functionality to pages while Sharepoint customization and that too by avoiding code writing.
In this article we will discuss various things about Web Parts like its editing, moving or adding. Hiding the toolbars in the chart Web Part is something you will learn to know about. The latest version of SharePoint is SharePoint Server 2010 offers nifty Chart web part which shows visual data from various sources including sharepoint lists, BDC, Excel services, etc. This SharePoint Web Parts proves to be a handy control for the developers while the 2007 version missed it. Developers while creating SharePoint solutions are offered with number of options if they use the 2010 version. The chart options include pies, lines, scatters, bars, cones, etc. in both 2D and 3D.
Well we have seen only the positive side but it has some annoying features too that can drive administrators crazy. That thing is at the time of dropping onto the page a toolbar is displayed showing links for “Data & Appearance” ...
... and “Advanced Properties” to everyone with more than basic read permissions. So this is not the thing what we want, right? Tempting to click everyone to see and click on those links to show up pretty little graphs. Well, is this easy enough to turn that off? The answer is “No”. Aren’t we forgetting to include the ubiquitous hide toolbar switch that’s on most other out of the box webparts? This little undocumented feature is what came around while trying to figure out a workaround.
A blog post by Nick Grattan suggests editing the page in SharePoint designer and then changing the web part properties manually in the mark-up. SharePoint destroyer results into hobbling performance if the page mark-up is saved in the content db so it is a better option to try out somewhat JavaScript trickery for solving this problem. Well by turning out the chart webparts that render the content of the toolbar in a predictable pattern.
Well for doing so for rendering the chart preview image the <span> tag in which the toolbar resides is followed by an <img> tag giving a link to a particular page. The input control is followed by <span> and it is the first child of the parent <div>. In the DOM it is easy to find and also a unique thing that we need to ensure that we aren’t turning off any other web part toolbars that we require. Thus, the below script is when added to the page in hidden content editor web part will hide those pesky toolbars by following DOM walking:
< script type="text/javascript" >

vararr = document.documentElement.getElementsByTagName("img");

for (vari = 0; i<arr.length; i++)

{

  varimgSrc = arr[i].src;

  if (imgSrc.indexOf("ChartPreviewImage") != -1)

  {

    var parent = arr[i].parentNode;

    parent.childNodes[1].setAttribute("style","display:none");

  }

}

< / script >
JQuery along with Dom is when preferred then it works well. Again it does also mean that we have to add the content editor and script to every single page our char web parts are on. Option to this one is that save the entire page back to the content DB in designer.

For More Information:- Sharepoint Consulting | Sharepoint Customization

Total Views: 208Word Count: 558See All articles From Author

Add Comment

Computer Programming Articles

1. Which Institute Is Best For Coding And Programming In Bhopal?
Author: Shankar Singh

2. Top 9 Benefits Of Custom Mobile Application Development
Author: Byteahead

3. Top 10 Creative Business Ideas For Entrepreneurs
Author: Byteahead

4. Top 10 Apps Like Tiktok Everyone Should Check Out
Author: Byteahead

5. Is The Apple Watch Series 7 Worth It For Seniors?
Author: Ashish

6. The Ultimate Guide To Ebay Product Listing Services: Elevate Your Online Store
Author: rachelvandereg

7. Which Are The Best Java Coding Classes In Bhopal?
Author: Shankar Singh

8. Warehouse Management In Zambia: Essential Features To Look For
Author: Doris Rose

9. Ecommerce Web Design And Development In Melbourne With The Merchant Buddy
Author: themerchantbuddy

10. Why Website Maintenance Is Crucial For Business Success
Author: Yogendra Shinde

11. Boost Your Business With Smart Invoice Pos Software In Zambia
Author: Cecilia Robert

12. How Stablecoin Development Ensures Stability And Security?
Author: Michael noah

13. Công Cụ Tính Chiều Cao Chuẩn Từ Minbin Tool: Đo Lường Và Cải Thiện Chiều Cao Hiệu Quả
Author: KenJi123

14. How To Make A Courier App For Courier Delivery And Tracking Service
Author: Deorwine Infotech

15. Reputation Management In The Digital Age: Protecting And Enhancing Your Law Firm’s Image
Author: jamewilliams

Login To Account
Login Email:
Password:
Forgot Password?
New User?
Sign Up Newsletter
Email Address: