Loading ...
Sorry, an error occurred while loading the content.
 

Re: Load/Render a Datatable when row clicked

Expand Messages
  • berli.michael
    Thanks for you answer, Satyam. But it doesn t work as i want it to :) I generate 3 datatables in one JS-File. Three divs are filled in a html-file. My three
    Message 1 of 3 , Sep 4, 2008
      Thanks for you answer, Satyam. But it doesn't work as i want it to :)

      I generate 3 datatables in one JS-File. Three divs are filled in a
      html-file.

      My three datatables look like that:
      (function load_path(test) {
      var getTerms = function(query) {
      myDataSource.sendRequest('query='+query ,
      myDataTable.onDataReturnInitializeTable, myDataTable1);
      };
      myDataSource1 = new YAHOO.util.DataSource("ajaxfile.php?");
      myDataSource1.responseType = YAHOO.util.DataSource.TYPE_JSON;
      myDataSource1.connXhrMode = "queueRequests";
      myDataSource1.responseSchema = {...}
      myDataTable1 = new YAHOO.widget.DataTable("output_div1", myColumnDefs,
      myDataSource1, {initialRequest: 'query=' + Dom.get('dt_input').value});

      That's (a part of) table1. Table2 & table3 are called myDataTable2 /
      myDataSource2 and myDataTable3/myDataSource3.

      All 3 tables have a Contextmenu and a rowClickEvent.

      I want to send a request on myDataTable2, when the user clicks on a
      row of myDataTable1.

      This code doesn't work:

      // Sends a request to the DataSource for more data
      function getData(){
      var oCallback = {
      success : myDataTable2.onDataReturnAppendRows,
      failure : myDataTable2.onDataReturnAppendRows,
      scope : myDataTable2
      };
      myDataSource2.sendRequest("query=orders&results=10", oCallback);
      }

      and in myDataTable1:
      myDataTable.subscribe("rowClickEvent", function (oArgs) {

      getData());
      });

      Thanks for help, wonderful support here by the way!!
    Your message has been successfully submitted and would be delivered to recipients shortly.