Posts

How to Enable ECB menu on custom column in SharePoint 2013?

Image
In this post we will discuss how to enable ECB menu on custom column in SharePoint 2013. By default the ECB menu comes for the Title column where user can click on the ECB menu to do some operations like Edit Item, View Item, Workflows, Delete Item etc. See the fig below: But here one of our requirement is to add the ECB menu into a custom column. I have a custom list where in the Title column the ECB menu is there by default but I wanted to put the ECB menu in a custom column name as First Name. We can do this by using SharePoint designer. Open your site in SharePoint 2013 designer and then click on the particular list for which you want to do. This will open the settings page for the list. From the Views section click on the particular view (All Items).  This will open the code view and there search for <View> tag and within that <ViewFields> and then find the particular column for which you want to add the ECB menu and then add ListItemMenu="TRUE...

Hide Save button in New and Edit form in SharePoint 2013 list

Image
Hide Save button from New Edit form We have a SharePoint list where we have customized the input form using InfoPath. And in that customized InfoPath form we have a custom Save button and we are saving the item from the default data connection. This button also has some validation rules. So we do not want any user to insert an item by clicking on the Ribbon Save button. They should only be able to save through our Submit button which was presented inside the InfoPath form. You can disable the Save button from the InfoPath form submit properties. But we do not want to show the Save button at all. Be default the submit button appears like below:  We have written the JavaScript and css code to hide the Save button. For this Edit the page and then Insert a Script editor web part into it. Then write the below code inside the script editor web part and Save the page. <script type="text/javascript">     function hideEdit() {      ...

SharePoint 2013 Keyword Query (KQL) Content Class Property Restrictions

Using property restrictions in your KQL queries, you can restrict your search to only pull back certain things like calendar events for instance. This is a very powerful way to limit search results  and get exactly what you are looking for. You can use these in your query like this: " lunch contentclass:STS_ListItem_Events " This will return only calendar events with the word "lunch" in them.  Pretty powerful and pretty simple. Here is a list of available content class items: STS_Site –  Site Collection STS_Web  –  Site (Web) STS_List_850  –  Page Library STS_ListItem_850  –  Page STS_List_DocumentLibrary  –  Document Library STS_ListItem_DocumentLibrary  –  Document Library Items STS_List  –  Custom List STS_ListItem  –  Custom List Item STS_List_Links  –  Links List STS_ListItem_Links  –  Links List Item STS_List_Tasks  –  Tasks List ...

How to Create a Workflow to Change Item Level Permissions

Image
Change Item Level Permissions In SharePoint 2010 there are item level permissions that can be applied on lists. Essentially you can mouse over each item, click on the drop down arrow, and choose Manage Permissions. On the permissions page you can choose the Stop Inheriting Permissions button on the ribbon and then customize the permissions on that item. Now you have the desired results across the board without needing to setup web parts with Audience Targeting.  However, this approach has a couple of flaws.  First, this method can be very daunting to manage especially for large lists.  Think of breaking the permission inheritance on each and every item in the list and then customizing the permissions.  Also think about managing it going forward, what happens when you have to add a new user to permissions?  Since inheritance is broken on the item you will have to manually add that new user to each item that they s...

Email ID Validation Using JavaScript Regular Expression

Source Code : < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server"> < title > Email ID Validation Using JavaScript Regular Expression. </ title > < script language ="javascript"> function ValidateEmailID(txtEmailID) { var filter = /^([\w-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([\w-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)$/; if (txtEmailID.value == "" ) { txtEmailID.style.border = "" ; return true ; } else if (filter.test(txtEmailID.value)) { txtEmailID.style.border = "" ; return true ; } else { txtEmailID.style.borderColor = "red" ; return false ; } } </ script > </ head > < body > ...

Create your own captcha image generator in asp.net using c#.net

Create two pages GenerateCaptcha.aspx and Registration.aspx GenerateCaptcha.aspx <% @ Page Language ="C#" AutoEventWireup ="true" CodeFile ="GenerateCaptcha.aspx.cs" Inherits ="GenerateCaptcha" %> <! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> < html xmlns ="http://www.w3.org/1999/xhtml"> < head runat ="server"> < title ></ title > </ head > < body > < form id ="form1" runat ="server"> < div > </ div > </ form > </ body > </ html > GenerateCaptcha.aspx.cs using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Dra...