Attach Sharepoint 2010 List attachment to gridview - sharepoint

I have a SharePoint list, which has attachments!!
I am using a custom grid-view to display some selected List fields from the list.
I would like to include the attachment as an embedded document in the Grid-view, Is that possible?

Got it worked, Created an anchor type item template in grid view.
And the Href property of the anchor tab is binded with the attachment retrieved pro grammatically. Working great!!

Related

Document Set NewDocSet.aspx HTML Field

If we have a document set content type containing a 'publishing HTML' column type, then when creating a new document set (NewDocSet.aspx) there is no ribbon loaded thus no richt text HTML editor box is shown for the 'publishing HTML' column.
Is it possible to load the ribbon and RTE functionality via JavaScript?
I fixed this by just using a custom application page form and adding the RTE textbox as SharePoint control

Adding an enterprise keyword value from search results using hover panel

SharePoint Enterprise Search is crawling SharePoint 2010 content and returning the expected results.
The requirement is to add "Enterprise keyword" value from the search results page for the selected document using the Hover panel. Each document already contains the metadata field (Enterprise Keyword).
By modifying the Search Display Template in SP2013 a hyperlink has been added in the Hover Panel as shown below.
When the "Add keyword" hyperlink is selected from the Hover panel it is required to populate the 'Enterprise Keyword' field with predefined value.
Help with an approach to achieve the above functionality (with references) greatly appreciated.

how to lookup image in sharepoint?

I have a Picture Library created with photos. In my Custom List, I want to create a lookup field to a Picture in my Picture Library and a description field. This I figured out by linking to the ID of the image in the Picture Library. How can I display that image as a thumbnail using my custom list? (Is it also possible to display a thumbnail or preview of the picture in my custom list since it know the ID of the picture?).
How about some javascript so that when you mouseover a list item in your custom list a modal window opens up with an image preview?

Sharepoint 2010 add Note Board to Custom List

Is it possible to add a note board or other web parts to a Custom List? I would like to be able to have comments on list items.
any particular reason you don't want to use a discussion board? That's it's entire purpose.
Create a data view webpart for your list. This webpart will display one item at a time, so you have to filter this dataview webpart by Item ID using querystring. The page on which you will deploy this dataview webpart will also have noteboard webpart. Comments given here will stick to that particular item which will be displayed in dataview based on Item ID.

How to validate data input on a sharepoint form?

How does one verify a text field with another list's column? I am currently populating a Drop down list with a datasource and then comparing the text field with items in the dropdown using javascript. Is there a better way?
The second problem I am having is how to trigger the Validate Function.
I am aware of two custom forms for adding data to a sharepoint list. One is created using The Dataview Webpart in Sharepoint Designer and the other is created using the List Form Webpart in Sharepoint Designer.
I have a DataFormWebPart I created using Sharepoint Designer Insert Dataview ->Insert Selected Fields as New Item Form. This gives Save and Cancel buttons at the end of the form. How do I intercept the Save button event?
I found one solution but it only works with the NewForm page that has OK Cancel Buttons. http://www.codeproject.com/KB/sharepoint/Control_validation.aspx
You'll have to use an event handler if you want to validate the state of multiple fields. You can use the ItemAdding/ItemUpdating events if you want to cancel an item which is being added/updated.
properties.Cancle = true;
properties.ErrorMessage = "Your validation message.";
http://msdn.microsoft.com/en-us/magazine/cc163318.aspx
http://blogs.msdn.com/brianwilson/archive/2007/03/05/part-1-event-handlers-everything-you-need-to-know-about-microsoft-office-sharepoint-portal-server-moss-event-handlers.aspx
can you add query strings into the formula box for validation?
e.g. like this:
^[a-zA-Z]{2}[0-9]{6}[A-Za-z]{1}$
which validates against a national insurance number.
sharepoint says the column must = true,
so could I enter something like
[column name] = ^[a-zA-Z]{2}[0-9]{6}[A-Za-z]{1}$
I think you are trying to build a tool like this one called SharePoint Form Validation.
If so, take a look at this blog: http://office.microsoft.com/en-us/sharepointtechnology/HA101054791033.aspx?pid=CH100650061033
Hope this helps!

Resources