Article archive

Add attachments to sharepoint list item programmatically

17/01/2018 17:17
 Copy splistitem attachments to other list item. If any changes were done on destItem, there must be saved before adding attachments     public static SPFieldUrlValue UpdateAttachments(SPListItem sourceItem, SPListItem destItem)         {  ...

Resize or rotate image in SharePoint library

16/01/2018 10:36
using System.Drawing;   ...   public static string ResizeImageItem(SPListItem item) { var message = Constants.Error;     var isImage = true; if (isImage) { var file = item.File; var parentFolder =...

Show error message in popup using SharePoint function

16/01/2018 10:25
We wanted to show some message in popup window of SharePoint style from javascript, something nicer than javascript alert. This function is core SharePoint function, so we don't need to create our custom using SP.UI.ModalDialog... it's very userful for showing...

Get selected image size by javascript

11/01/2018 12:32
 var test = {  getSelectedPictureSize: function (fileObj) {         var _deferred = $.Deferred();           var imageSize = { width: 0, height: 0 };                 var reader = new...

Get SPListItem image size

11/01/2018 11:39
How to get image dimensions from SPListItem in case of picture is stored in Pictue library or Document library. in case of Picture library, there are fields to store this values, but not in Document library. However this value is stored in MetaInfo field which contains also other values. So we can...

Find element in sharepoint dialog

10/01/2018 13:33
The case is we have scripts included in master page and there is method location. By calling this method we want to find element in open dialog and update it. As jQuery can find it in context of local dialog and not from root window, we used following code:   var modalDialog =...

Get folder for list item

12/12/2017 15:50
SPFolder folder = item.Web.GetFolder(item["FileDirRef"].ToString());

Draggable not working in Chrome

08/12/2017 15:41
In our SharePoint project we needed to define our custom drag and drop functionality using draggable='true' html attribute rendered in SharePoint list views.This was working fine in Internet Explorer, but Chrome somehow ignored this attribute. After lot of investigation and digging into this issue,...

Get users from item user field

01/12/2017 12:06
 public static List<SPUser> GetUsersFromField(SPListItem item, string fieldName)         {             SPGroup group = null;             var users = new List<SPUser>();      ...

User access to custom application page

01/12/2017 12:02
To enable set e. g. edit permissions for only folder for some specific user who is not member of any sp group, we need to deactivate site collection feature Limited-access user permission lockdown mode    Then user can access its folder and doesn't see other content. He can browse,...
Items: 1 - 10 of 372
1 | 2 | 3 | 4 | 5 >>