Having multiple JSLink based webparts on the same page, overrides all the other templates in SP 2013


Scenario: Create a dashboard page in SP 2013, displaying just 3 lists in 3 different views using Js Link capability. The 3 lists are: Accordion: A list containing title and description which will be displayed on the dashboard with an accordion functionality with title being the accordion item heading and description being the accordion item body. Menu: … Continue reading Having multiple JSLink based webparts on the same page, overrides all the other templates in SP 2013

JSLink SharePoint 2013 troubleshooting


JsLink is a good feature that was introduced in SP 2013 to allow users to bring in more flexibility in Client Side Rendering (CSR). With this you can control how your list data is getting displayed in View, Display, Edit and New forms. For ex., you can achieve this using JSLink:   You can check … Continue reading JSLink SharePoint 2013 troubleshooting

Basics of javascript Templating


Being the 100th post, i felt i should share some of my most useful learning here. And i could not think of anything better than javascript Templating. There are quite a handful of such templating tools available online(JsRender, Underscore.js, Moustache.js...). Feel free to run a jsPerf on the tool you wish to use and then … Continue reading Basics of javascript Templating

Detect multiple key press in javascript for your website


Many a times we end up in situations where in our clients are windows app migrants to web. And they could not let go off the "hotkey" concept. Let's say "Ctrl + S" or "Alt + R" to perform save or submit operation on a website. The options are endless. A scalable code that you … Continue reading Detect multiple key press in javascript for your website

Combining Multiple attributes in jQuery


Below are some of the code snippets available in jQuery for you to combine your multiple lines of code: Combining multiple css properties or element attributes: Statement: Set the width and height attributes for a table with id=mytable $("#mytable").attr({width:'50px',height:'40px'}); Statement: Set the css properties of width, height, background-color for a div with id=mydiv $("#mydiv").css({width:'50px',height:'40px',background-color:'#F2F2F2'}); Combining … Continue reading Combining Multiple attributes in jQuery

Best Practices for jQuery Developers


Following are some of the best practices that you could follow while working with jQuery: Plugins: Please avoid unnecessary use of plugins If a plugin is being used, respect the authors work and ensure that the plugin file is reused with the license comments intact If you are writing a reusable functionality in the code, … Continue reading Best Practices for jQuery Developers

Generate JSON string output in C#


This is one of the most widely used and very useful script that you could use in your web services/ WCF services/ Handlers or any place wherein you require a JSON string to be passed to the client/ consumer. We make use of the Serialize method in JavaScriptSerializer class in C# under the following namespace: … Continue reading Generate JSON string output in C#