3.2.0

Editable table with XML data (version 2.0.1)

All,

I am new to active tables, and trying to create a editable table. We have xml data set to the table. As given in the support forum and examples, i have setCellEditable(true) and also a function to table.setText as mentioned in javascript.forum.1621.6/editable-templates-with-xml-data.html.

var obj = new AW.UI.Grid;
obj.setHeaderText(myHeaders);
obj.setCellEditable(true);

//create ActiveWidgets data model - XML-based table
var table = new AW.XML.Table;
table.setXML(data);
alert('data recieved');

//provide external model as a grid data source
obj.setCellModel(table);
obj.refresh();
obj.setRowCount(table.getCount());
obj.setColumnCount(4);

//modify model to write data back to the XML 
table.setText = function(value, i, j){ 
     var node = this.getNode(i, j); 
     node.text = value; 
} 
    
obj.setCellFormat([string, string, string,string]);
obj.setSelectionMode("single-row");


Do i need to create a template as mentioned? Isnt that for version 1.0?
Can you please suggest a solution to set the table editable?

thank you
Raj
July 4,
well, i got it working. Only change i made is to comment out the line obj.setSelectionMode("single-row");
Raj
July 4,

This topic is archived.

See also:


Back to support forum