Posts

Showing posts from March, 2014

What's the difference between encapsulation and abstraction?

Encapsulation provides the explicit boundary between an object's abstract interface (its abstraction) and its internal implementation details. Encapsulation puts the implementation details "in a capsule." Encapsulation tells users which features are stable, permanent services of the object and which features are implementation details that are subject to change without notice. Encapsulation helps the developers of an abstraction: it provides the freedom to implement the abstraction in any way consistent with the interface. (Encapsulation tells developers exactly what users can and cannot access.) Encapsulation also helps the users of an abstraction: it provides protection by preventing dependence on volatile implementation details. Abstraction provides business value; encapsulation "protects" these abstractions. If a developer provides a good abstraction, users won't be tempted to peek at the object's internal mechanisms. Encapsulation is simply a safet

People Editor inside Update Panel / People editor inside GridView

People Editor control is not working properly inside the Update Panel Soln: Just include the  entityeditor.js  file explicitly on the page < script type ="text/javascript" src ="/_layouts/15/entityeditor.js"></ script >

SharePoint DateTimeControl Not Showing inside Update Panel

Problem Suspect that because date time control is located under update panel, and page didn’t manage to load in picker’s javascript. Solution <script type = "text/javascript" src = "/_layouts/datepicker.js" ></script> Just include the datepicker.js file explicitly on the page More :  Problems with UpdatePanel on SharePoint

Migrating Site From SharePoint 2010 to SharePoint 2013

http://passionatetechie.blogspot.in/2012/07/migrating-site-from-sharepoint-2010-to.html

Export All WSP's from Central Administration using Powershell

Image
$dirName = "c:\Exported Solutions\" if (!(Test-Path -path $dirName)) { New-Item $dirName -type directory } Write-Host Exporting solutions to $dirName foreach ($solution in Get-SPSolution) {     $id = $Solution.SolutionID     $title = $Solution.Name     $filename = $Solution.SolutionFile.Name     Write-Host "Exporting ‘$title’ to …\$filename" -nonewline     try {         $solution.SolutionFile.SaveAs("$dirName\$filename")         Write-Host " – done" -foreground green     }     catch     {         Write-Host " – error : $_" -foreground red     } } Result: You can download the script  here   Get a specific wsp from SharePoint Central Administration Code Snippet : $dirName = "c:\Exported Solutions\" if (!(Test-Path -path $dirName)) { New-Item $dirName -type directory } Write-Host Exporting solution to $dirName $farm = Get-SPFarm $file = $farm.Solutions.Item("hfreports.wsp").SolutionFile $f

Hide/Show SPRibbon in SP2010 / 2013 based on User Permission by using SharePoint Designer in

Image
1. Just call the Jquery file in master page header section like below. < script type ="text/javascript"   src ="/Style%20Library/jquery-1.6.1.min.js"></ script >   2. We need to remove the welcome menu control from  < SharePoint:DelegateControl >         3. Add this below DIV controls after SPRibbon DIV tag closed.    < div class ="s4-trc-container-menu1" style =" text-align : right ; float : right ; width : 100% ; position : absolute ; margin-top : 10px ; ">   < div id ="notificationArea1" class ="s4-noti" style =" right : 16px ;   top : 0px ; height : 22px"> < wssuc : Welcome id ="IdWelcome1" runat ="server" EnableViewState ="false"></ wssuc : Welcome > < wssuc : MUISelector ID ="IdMuiSelector1" runat ="server"/> </ div > </ div >   4. Then finally A

Required field validator for CheckBoxList

< asp : CheckBoxList ID ="chkDepartments" runat ="server" RepeatDirection ="Horizontal"></ asp : CheckBoxList >                 < asp : CustomValidator runat ="server" ID ="chkT"                     ClientValidationFunction ="ValidateDepartments"                     ErrorMessage ="Please select atleast one Department" ValidationGroup ="k" ForeColor ="Red"></ asp : CustomValidator > < script type ="text/javascript">         function ValidateDepartments(source, args) {             var chkListModules = document.getElementById( ' <% = chkDepartments.ClientID %> ' );             var chkListinputs = chkListModules.getElementsByTagName( "input" );             for ( var i = 0; i < chkListinputs.length; i++) {                 if (chkListinputs[i].checked) {                     args.IsValid = true ;

SharePoint 2013 list column status wise Change row Color using jQuery

Image
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.10.0/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function(){$Text = $("td.ms-cellstyle.ms-vb2:contains('Approved')");$Text.parent().css("background-color", "#01DF3A"); $Text = $("td.ms-cellstyle.ms-vb2:contains('Rejected')"); $Text.parent().css("background-color", "#F90101"); $Text = $("td.ms-cellstyle.ms-vb2:contains('Pending')"); $Text.parent().css("background-color", "#EAC117"); }); </script> Source :  http://www.enjoysharepoint.com/Articles/Details/sharepoint-2013-list-column-status-wise-change-row-color-using-20634.aspx

SharePoint 2013: Folder Navigation/Breadcrumb

Image
Refer below Link http://social.technet.microsoft.com/wiki/contents/articles/19713.sharepoint-2013-folder-navigationbreadcrumb.aspx Source :  http://ranaictiu-technicalblog.blogspot.com.au/2013/07/sharepoint-2013-folder-navigation-for.html               http://code.msdn.microsoft.com/SharePoint-2013-Folder-661709eb

Move Listbox items to another Listbox using jquery

< script type ="text/javascript" src ="Js/jquery-1.9.1.js"></ script >     < script type ="text/javascript">         $(document).ready( function () {             $( '# <% = btnAdd.ClientID %> ' ).click( function () {                 var selectedOptions = $( '# <% = lstSource.ClientID %> option:selected' );                   if (selectedOptions.length == 0) {                       alert( "Please select option to move" );                       return false ;                   }                   $( '# <% = lstTO.ClientID %> ' ).append($(selectedOptions).clone());                 $(selectedOptions).remove();                 return false ;               });             $( '# <% = btnRemove.ClientID %> ' ).click( function () {                 var selectedOptions = $( '# <% = lstTO.ClientID %> option:selected' );