Posts

Showing posts from May, 2013

Multi Level Grouping in SharePoint List Programmatically

<SharePoint:ListViewByQuery ID="TestID" runat="server" /> In Code Behind:  SPList oList = web.GetList("SampleList"); TestID .List = oList; SPQuery query = new SPQuery(oList.DefaultView); query.Query= "<GroupBy Collapse='FALSE'><FieldRef Name='Title' /><FieldRef Name='Subject' /></GroupBy>"; TestID .Query = query; Hope this will helps you!!! Happy coding....

ASP.net Ribbon

Ref :  http://aspnetribbon.codeplex.com/

How to print a panel in SharePoint 2010

< Script type ="text/javascript">         function printform() {             var printContent = document.getElementById( " <% = pnlFullForm.ClientID %> " );             var windowUrl = "about:blank" ;             var uniqueName = new Date();             var windowName = "Print" + uniqueName.getTime();             var printWindow = window.open(windowUrl, windowName, "left=50000,top=50000,width=0,height=0" );             printWindow.document.write(printContent.innerHTML);             printWindow.document.close();             printWindow.focus();             printWindow.print();             printWindow.close();         } </ script > ********************************************** < input type ="button" value ="Print" id ="btnPrint" title ="Print" onclick ="printform();"                     class ="ms-ButtonHeig

Controls not working after Export to Excel or Export to PDF

Add the following script to your webpart / custom control that need to have export and other controls functionals So here you go with the working solution. < script type ="text/javascript" language ="javascript">     //sharepoint postback to work after clicking on export to excel button     if ( typeof (_spBodyOnLoadFunctionNames) != 'undefined' &&                                            _spBodyOnLoadFunctionNames != null ) {         _spBodyOnLoadFunctionNames.push( "supressSubmitWraper" );     }     function supressSubmitWraper() {         _spSuppressFormOnSubmitWrapper = true ;     } </ script > Hope this will helps. Reference : Click here