ericmbarnard/KoGrid — pull request #76 by Crash8308 (2012-10-02 05:24:20+00:00)
Title: Property path

Opening the pull request to discuss the proposed property path changes.

1. Adding a function to utils called "unwrapPropertyPath." this function searches an object for a path provided by "field" of a given column definition. This will enable users to specify an object hierarchy to the definition described in a standard object notation "object.property.path". Example:

columnDefs = ko.observable([
{ field: 'productInfo.Icon', displayName: 'Symbol', width: 50,},
{ field: 'productInfo.name.', displayName: 'Name', width: 110 },
{ field: 'productInfo.price', displayName: 'Price', width: 220 }]);
2. refactoring utils to clean up the global variable "utils". half of the code was accessing utils through kg.utils, and the other half was using utils as a globally assigned var.