Sample: dhtmlxGrid | Setting custom attributes | dhtmlxGrid main page |
Grid allows to set custom attributes for rows by the xml or using setRowAttribute grid method. In order to get attributes getRowAttribute method can be used.
Name: Value: |
/*getting attributes*/ mygrid.getRowAttribute(row_id,name)); /*setting attributes*/ mygrid.setRowAttribute(row_id,name,value); /*adding new attribute to serialization string*/ mygrid.xml.row_attrs.push(name); XML: <?xml version="1.0" encoding="UTF-8"?> <rows> <row id="1" date="05/01/1998" price="12.99"> <cell>-1500</cell> <cell>A Time to Kill</cell> <cell>John Grisham</cell> </row> ... </rows>
© DHTMLX LTD. All rights reserved |