Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1654
  • Last Modified:

SharePoint 2010 Dynamic WebPart Title

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
bon733
Asked:
bon733
  • 2
1 Solution
 
static-voidCommented:
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
 
bon733Author Commented:
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
 
static-voidCommented:
$('.ms-WPTitle span')[0].InnerHtml('fdfsfsdfsdf');

something like that?
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now