Wijmo UI for the Web
readAttributesFromData Field
wijmo.grid Namespace > IDetailSettings Interface : readAttributesFromData Field

A value indicating whether DOM cell attributes can be passed within a data value.

Syntax
var instance; // Type: wijmo.grid.IDetailSettings;
var value; // Type: boolean
value = instance.readAttributesFromData;
var readAttributesFromData : boolean;
Example
// Render the style attribute passed within the data.
$("#element").wijgrid({
    readAttributesFromData: false });
    data: [
        [ [1, { "style": "color: red" } ], a ]
    ]
});
Remarks
This option allows binding collection of values to data and automatically converting them as attributes of corresponded DOM table cells during rendering. Values should be passed as an array of two items, where first item is a value of the data field, the second item is a list of values: $("#element").wijgrid({ data: [ [ [1, { "style": "color: red", "class": "myclass" } ], a ] ] }); or $("#element").wijgrid({ data: [ { col0: [1, { "style": "color: red", "class": "myclass" }], col1: "a" } ] }); Note: during conversion wijgrid extracts the first item value and makes it data field value, the second item (list of values) is removed: [ { col0: 1, col1: "a" } ] If DOM table is used as a datasource then attributes belonging to the cells in tBody section of the original table will be read and applied to the new cells. rowSpan and colSpan attributes are not allowed.
See Also

Reference

IDetailSettings Interface