Running grid methods from XML

Hi,



how can i specify attachEvent within xml?



Thanks in advance!

you can’t specify exact js code in XML, but if you have some function in HTML file

function onActionDo(){ some_code() }

You can have in XML file a next statement



onRowSelectonActionDo

Hi,
it doesn’t work with your example. The following is the code for initialising the grid:

  var mygrid;
  function doInitGrid(){
   mygrid = new dhtmlXGridObject(‘mygrid_container’);
   mygrid.setImagePath("/otdassist/images/imgs/");
   mygrid.enableBlockSelection();
   mygrid.copyBlockToClipboard();
   mygrid.init();
   mygrid.loadXML(“xml_feed.jsp?action=get_data”);  
  }

and the following is a part of xml code (in java):

out.append("");

out.append("");
out.append("<column width=“150” type=“ro”  align=“right”>Title “);

out.append(”");
out.append("<call command=“attachEvent”> onEditCell doOnEditCell “);
out.append(”");
out.append("");

it doesn’t work with mygrid.init() nor without. Have you any idea?

Thanks in advance!


>>out.append(“<call command="attachEvent"> onEditCell doOnEditCell ”);
There are unnecessary whitespaces inside param tags which cause problems.



Please check attached sample.


1220456255.zip (85 KB)