:: Forum >> Version 2 >>

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(valueij){ 
     var 
node this.getNode(ij); 
     
node.text value

    
obj.setCellFormat([stringstringstring,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
Tuesday, July 4, 2006
well, i got it working. Only change i made is to comment out the line obj.setSelectionMode("single-row");
Raj
Tuesday, July 4, 2006



This topic is archived.

Back to support forum

Forum search