ComponentOne GridView for ASP.NET WebForms
jQuery.wijmo.c1gridview Namespace / options type / readAttributesFromData Option
In This Topic
    readAttributesFromData Option
    In This Topic
    A value indicating whether DOM cell attributes can be passed within a data value.
    Syntax
    // Get value
    var value; // Type:  boolean
    value = $(".selector").c1gridview("option", "readAttributesFromData");
    
    // Set value
    var newValue; // Type:  boolean
    $(".selector").c1gridview("option", "readAttributesFromData", newValue);
    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.
    Browser Compatibility
    8
    5
    5
    See Also