Showing posts with label SharePoint WebPart. Show all posts
Showing posts with label SharePoint WebPart. Show all posts

Thursday, September 22, 2016

22 Sep

Using REST API For Selecting, Filtering, Sorting And Pagination in SharePoint List

 how to work with SharePoint list items, basically performing CRUD operations, using the combination of REST API  and jQuery Ajax. The REST URI ends with any OData query operators to specify selecting, sorting, or filtering Selecting and sorting items: $select : This ' /_api/web/lists/getbytitle('test')/items'...

Friday, May 20, 2016

20 May

context menu with JavaScript (Script Editor Web Part)

We script in Script Editor webpart on the page <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){     $(".ms-list-itemLink > a").each(function(){      ...

Thursday, May 19, 2016

19 May

How to add or Change the Placeholder Text for the Find a file search box for document libraries

You can add a Script Editor Web part on the page (and you can hide it from Script editor properties) and add a script tag to jQuery <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.3/jquery.min.js"></script> <script> $( "#inplaceSearchDiv_WPQ1_lsparent :input").attr('placeholder','Ahmed');...

Saturday, February 13, 2016

13 Feb

Add, Update and install WSP in SharePoint using PowerShell Script

Add WSP using the following power shell script $wspname="C:\\name.wsp" Add-SPSolution -Identity wspname Upgrade a WSP using the following power shell script. (Update-SPSolution -Identity wspname -LiteralPath Physicalpath -GACDeployment)Update-SPSolution -Identity ListDefinition.wsp -LiteralPath  C:\\name.wsp -GACDeployment Install...

Friday, February 12, 2016

12 Feb

How to Hide a web part for selected users in Sharepoint

JQuery: We ll do get div id or class for particular webpart display:none SharePoint Feature: Edit page Edit webpart properties in current page web part's properties panel expand the Advanced section, scroll to the bottom and select the Target audience to hide the web part. Save your changes and...
12 Feb

When we get retrive People or Group field returning semicolon hash then Name

1;#Deepak Kumar Get User name: new SPFieldLookupValue(properties.ListItem["Staff Member"].ToString()).LookupValue; Get User ID: new SPFieldLookupValue(properties.ListItem["Staff Member"].ToString()).LookupId; Using Split fuction: properties.ListItem["Staff Member"].ToString(); You are going to be returned their...

Tuesday, January 12, 2016

12 Jan

Add css class to webpart cell

$('div[id$=Test]').addClass('cssClassAddedFromCode'); var addCssClassScript = "$('div[id$=Test']').addClass('cssClassAddedFromCode');"; ScriptManager.RegisterClientScriptBlock(this.Page, this.GetType(), "AddCssClass", addCssClassScript, true...