telerik/kendo-ui-core — pull request #123 by advancedrei (2014-06-15 06:31:51+00:00)
Title: Allow defaultValue to be a function.

Solution for Issue #122.

**Why:** There are situations where a new item being added to a dataSource can have a default value that is not static. For example, when a foreign key is not directly settable and isn't know until after a Grid has already been initialized.

**What:** Proposed solution allows for function evaluation during model initialization, in addition to using strict value types.

**How:** A slight modification of the defaultValue field to first set the defaultValue to the given internal default from the defaultValues array, then if the default value is not undefined, return the execution of the function if the default value is a function type.

NOTE: Test cannot exactly confirm because the Grid is not a part of the Core, but it does demonstrate the logic behind the idea in a testable way.