Tag Info

Hot answers tagged

5

I am assuming you provisioned the column as a site column. So, the next thing is to make sure to push the changes to the down to lists and content types where this site column has been referred (which apparently you haven't done it). So, I would recommend to delete the old definition and provision the column again! See an example below where I am using the ...


4

If you want to customize a list new\edit\display form there is a couple of ways you can do it. I mean programming ways (not InfoPath). All this methods related to creating custom rendering templates. Every list form has its own rendering template, for list its a "ListForm", for document library "DocumentLibraryForm". All this templates (and otheres) listed ...


3

You can use jQuery to change the behavior. This is based off something I did 2007, but the same should hold true in 2010. It appends a target=blank attribute to any a href that ends in .msi. You'd just need to change the selector to the proper attribute for the lookup field. <script type="text/javascript" src="/Resources/jquery.js"></script> ...


3

You could edit the DispForm of the list item and in it have a delegatecontrol (or some other custom control) to count how many times the page has been loaded by unique user id's other than the authors id. Update Create a new user/web/delegate control and insert the following code: var web = SPContext.Current.Site.OpenWeb(); var list = web.Lists["Name of ...


2

[There was a not useful answer] UPDATE: OK, I understand the problem now. In my case the field is present in the section (I've removed other fields for simplicity): <DataFields>@MultiLookupTest_x003a_TestField,MultiLookupTest:TestField;</DataFields> And then you can render it just in the same manner as others but you need to use a part of ...


2

You have misunderstanding of using CustomActionGroup. It uses for creating groups not in ribbon, but in sharepoint pages, for example in site settings. Chris O'Brien has written good blog posts about ribbon customization here. And if you have doubts how to create ribbon button or group, it is good idea to digg into cmdui.xml (this file contains definition ...


2

The code you posted should work also for old lists, as it uses the Update(true) method. There is only one case I can think of, when pushing down changes from the parent Content Type to the child Content Type does not work: when the content type is either read-only, or sealed. Please read this site for more info. Please let me know if that helped you. ...


2

I think you might be missing the fact that you need to update the CT after you have updated the field, also I normally don't declare the C as var but rather a CT. See the code below: (Also make sure the internal name "C" is unique to that field and not mixed with a required field in another CT.) Best of luck SPContentType ct = web.ContentTypes["CT"]; ...


2

Trying to change the display name of the Title is going to be an uphill struggle: There are several versions of the same column, each with their own DisplayName (some of which are created in the list). If you open your list in SharePoint Manager, you'll see the various hidden Title fields. My advice would be to hide the title field (Hidden="TRUE" in the ...


2

In SharePoint 2010, the default display forms include an anchortag in the table rows with a name attribute of: SPBookmark_YourFieldName If you are using those default display forms, you can take advantage of this and locate your values using jQuery like the following. In this example, my date field is named 'SiteCreateDate': // my example list field is ...


2

You can parse the ID parameter from query string in Dispform.aspx, once you have the ID value you can update "Add new Item" link and pass ID from DispForm.aspx. Please refer to Parse Query String from Javascript to parse URL and get value from Query String.


1

Yes, you can do this by SharePoint Designer. Add a lookup column to the Orders list, which will refer to the Customers list Open Customers list in SharePoint Designer Edit Customers Display Form, from the toolbar, select Insert a "Related Item View", your Orders list should show up in the option list, choose it Add/Remove columns of the Orders view You ...


1

Using jQuery, find the nearest item with a unique identifier. Not all fields in a form have unique IDs, as you found with the date fields, which all have the id="SPFieldDateTime". The corresponding label column, however, contains the field name and this one must be unique. Use this as your hook. You can then go to the sibling of the unique element with ...


1

Try using the getTagFromIdentifierAndTitle method to get this value rather than using jQuery's element selector. The reason being is SharePoint writes some funky code for it's aspx pages and if you are using SharePoint Designer's form fields, this code will most likely find the element you need. Give it a try to set your variable and then extract the ...


1

As you already discovered, one way is to use the DelegateControl approach (with PlaceholderAdditionalPagehead) and that's in fact what I've been using for a couple of years now. The key is how to access the built-in editform.aspx/dispform.aspx pages with the embedded WebPart showing the SPListItem. That's done by hooking your WebControl into ...


1

Create a base class for your web parts that handles exceptions. That way the page doesn't fail, just your web part. The error message is displayed on the page where your web part should be, the surrounding web parts are rendered normally. I use this as the base class for all my web parts. ...


1

Stefan Bauer wrote a post about this that covered it quite nicely! I know the question have been answered but this post, in combination with this question, helped me to solve my task! http://www.n8d.at/blog/hide-fields-from-lists-and-content-types/ The Essentials: # First load SharePoint Core Assembly ...


1

The problem appears to be with reuse of the SPWeb (wrapped in SPContext) used by ItemContext and RenderContext I had a number of different problems including the one here, they all finally went away when I created my own SPWeb every time I need one. using (SPSite site = new SPSite(list.ParentWeb.Url)) { using (SPWeb web = site.OpenWeb()) { ...


1

I normally hate "Why" answers, but here goes: WHY? The Edit Form is for modifying the properties of a list item, or a library item (document). The Display Form is for showing (read-only) the properties of a list/library item. If a user is looking at the item properties in read mode, they can click the link and get the document. If the user is in edit mode, ...


1

Why don't you add a Content editor web part on dispform.aspx and try adding the video play (code) there instead? You can always add a Web Part to the list forms.


1

You can create as many DispForms as you'd like for a list. In SharePoint Designer, copy the existing Dispform and rename the copy. Hide the default form on the page by setting the IsVisible and IsIncluded flags to false. Then add in a Custom List Form web part. Customize as desired based on your requirements. Then through navigational control and or ...


1

The parent SPMobilePage has a Response property which can be used to directly inject markup into the response stream. So in this case in my OnLoad() method is simply find the parent and then add the processing instruction markup: protected override void OnLoad(EventArgs e) { base.OnLoad(e); SPMobilePage parent = this.Parent.Parent as ...


1

The preferred approach to implementing this would be to use a custom Rendering Template. Rendering Templates are ASCX files in the ControlTemplates folder which define how SharePoint forms are displayed in both display and edit. There are high level templates 'form' and very low level templates like 'textbox'. For multi lookup fields there is the template ...



Only top voted, non community-wiki answers of a minimum length are eligible