Skip to content

Instantly share code, notes, and snippets.

#set($stringObjectName = "${pagegenerator.FormName}${qfcontrol.ControlId}_Strings")
## -----------Column and Grid macros -----------------------------------------------
#macro(doDefaultColParts $col)
field: '$col.DataField',
#if($col.TextFormatString != "")
displayFields: ['$col.DataField'],
displayFormatString: ${stringObjectName}['$generator.ConvertResourceKeyToScriptReference($col.getColResourceKey("FormatString"))'] || '$col.TextFormatString',
#end
#doHideCondition($col)
label: ${stringObjectName}['$generator.ConvertResourceKeyToScriptReference($col.getColResourceKey("ColumnHeading"))'] || '$col.ColumnHeading',
@nicocrm
nicocrm / CrossOriginSupportModule.cs
Last active April 20, 2017 12:13 — forked from mmorton/CrossOriginSupportModule.cs
An IHttpModule for Enabling CORS
using System;
using System.Web;
namespace SSSWorld.CorsHelper
{
public class CrossOriginSupportModule : IHttpModule
{
public const string Options = "OPTIONS";
public const string Origin = "Origin";
public const string AccessControlRequestMethod = "Access-Control-Request-Method";
@nicocrm
nicocrm / README.markdown
Last active September 9, 2015 09:38 — forked from beccasaurus/README.markdown
Adds hooks to jQuery.validate's form/element validation methods (via trigger())

jQuery Validate Hooks

If you're using [ASP.NET MVC3][], it uses [jQuery Validate][] to do client-side validations. Instead of using [jQuery Validate][] directly, however, it wraps it with its own jQuery plugin called [jQuery.Validate.Unobtrusive][]. [jQuery.Validate.Unobtrusive][] sets up [jQuery Validate][] for you, behind the scenes, so you don't have an opportunity to customize your [jQuery Validate][] settings at all!

We've been running into trouble with this when we've been doing our own custom client-side validations. We need a way to integrate with the build-in [ASP.NET MVC3][] validation so we can: