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

Re: overriding functions in DataTable not working

Expand Messages
  • Ryan V. Bayona
    wow,wow,wow! thanks for the tips satyam.. forgive me for being a total noob :) anyway, i changed the code and it now worked:
    Message 1 of 3 , Dec 3, 2007
    • 0 Attachment
      wow,wow,wow! thanks for the tips satyam.. forgive me for being a total
      noob :) anyway, i changed the code and it now worked:

      YAHOO.util.Event.addListener(window, "load", function() {
      YAHOO.example.data = json;
      this.myDataSource = new YAHOO.util.DataSource(YAHOO.example.data)
      this.myDataSource.responseType = YAHOO.util.DataSource.TYPE_JSARRAY;
      this.myDataSource.responseSchema = {
      fields : ["trackerid","username","modify_date","information"]
      };
      //column definition
      this.myColumnDefs = [

      {key : "username",label: "User"},
      {key : "modify_date",label : "Modify Date",sortable:true },
      {key : "information",label : "Information"}
      ];

      this.myDataTable = new
      YAHOO.widget.DataTable("myContainer",this.myColumnDefs,this.myDataSource,{scrollable:
      true, selectionMode:"single"}) ;

      this.myDataTable.subscribe("rowMouseoverEvent",
      myDataTable.onEventHighlightRow);
      this.myDataTable.subscribe("rowMouseoutEvent",
      myDataTable.onEventUnhighlightRow);
      this.myDataTable.subscribe("rowClickEvent",function (ev){
      this.target = YAHOO.util.Event.getTarget(ev);
      this.record = this.getRecord(this.target);
      alert(this.record.getData("information"))
      });
      });

      THANKS !
    Your message has been successfully submitted and would be delivered to recipients shortly.