Solved

SharePoint 2010 Dynamic WebPart Title

Posted on 2010-11-08
3
1,626 Views
Last Modified: 2012-06-27
I have a requirement to add a date\time to a webpart title with a SharePoint site. The source of the date is contained in a sql table (e.g. process date) . Whats the easiest way? CEWP?
0
Comment
Question by:bon733
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 8

Expert Comment

by:static-void
ID: 34100754
Is the webpart you want to change the title for a webpart of your own (if so i would set the title in the constructor of the part)

If not you can use the LimitedWebPartManager to retrieve a collection of webparts for a given SP page (url) and from there you can manually set the title.
0
 

Author Comment

by:bon733
ID: 34105363
The web parts in question are generated by DashBoard Designer to a Dashboard page. I was hoping to use javascript and a CEWP to cycle through the titles on the page and just append a date time to them. It seems very simple, but getting the script to cycle through all of the Titles is difficult. I will take a look at the LimitedWebPartManager object and see the options.
0
 
LVL 8

Accepted Solution

by:
static-void earned 500 total points
ID: 34108275
$('.ms-WPTitle span')[0].InnerHtml('fdfsfsdfsdf');

something like that?
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Work Over Net is a new and very powerful collaboration product. With its new easy interface it is becoming very competitive to other similar products like webex and office interactive. WON 2010 have the standard business tools needed for multi-offic…
For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question