Wijmo UI for the Web
readAttributesFromData Field

Default value: false

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

Syntax
Javascript (Usage) 
var value; // Type: bool
value = jQuery.wijmo.wijgrid.options.readAttributesFromData;
Javascript (Specification) 
var readAttributesFromData : bool;
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.
Browser Compatibility
7
5
5

See Also

Reference

options type

 

 


© 2013 All Rights Reserved.

Send comments on this topic.