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

52352Re: [ydn-javascript] Datatable inline cell editor fails @ times

Expand Messages
  • vino ben
    Jan 12, 2010
    • 0 Attachment
      Hi Satyam,

          Thanks very much for the leads. I have tried the tests that you had suggested.

          1) Used YUI logger and included datasource and datatable in debug mode 

              - There are no WARN messages
       
          2) Loaded the page in firefox with firebug 

             - Interestingly the bug isnt occuring in firefox ( Is this some sort of a clue ?)

          3) Installed JSLint in my IDE and checked for all warnings and JSLint did not report anything suspicious.

               I might be going wrong somewhere in JSLint settings. ( I'm working on this )

          To add to this..

          * I use a custom editor (Text with Autocomplete) which I extend from textBox cell editor. Would this have something going wrong ? ( JSLint does not complain about anything here)
        
          * I have custom formatting logic which I perform immediately after the datatable constructor. And all subscribers after this...
             Will this be of any impact ?. Should I be having all the subscribers immediately after the constructor and not after the custom formats ?

             myDataTable = new YAHOO.widget.ScrollingDataTable("yuifincodescontainer", myColumnDefs, myDataSource, {width:"95%", height:"20em",formatRow: myRowFormatter});

             datatablePostFormatting();

             // Followed by 
              myDataTable.subscribe("cellMouseoverEvent", highlightEditableCell);
              myDataTable.subscribe("cellMouseoutEvent", myDataTable.onEventUnhighlightCell);
              myDataTable.subscribe("cellClickEvent", function (oArgs){});
      myDataTable.subscribe('editorSaveEvent', function(oArgs) {});

             - Becuase I noticed some TimeOut phrase being used in the datatable js

      Thanks & Regards,
      Vinoth



      From: Satyam <satyam@...>
      To: ydn-javascript@yahoogroups.com
      Sent: Fri, January 8, 2010 8:57:17 PM
      Subject: Re: [ydn-javascript] Datatable inline cell editor fails @ times

       

      That is usually some initialization code that fails under certain circumstances and the DataTable doesn't get fully initialized.  

      For those mysterious errors, the steps to clean them is, run JSLint on the code and pay attention to all its warnings, even harmless unused variables might point to misspellings, you declared it one way and never used it because you used it with another name elsewhere.  All YUI code gets zero errors in JSLint and this is very large and complex code base, nevertheless, it reaches you clean of errors. 

      If you are using JSON, use JSONLint to see if it is valid.  Don't use a hand-coded JSON encoder on the server, there are some subtleties with the encoding of characters beyond the normal US-ASCII and in a particular query you get one record containing such character, it will break.

      Load -debug versions of the relevant components (DataSource, DataTable) and add a Logger to your page.  If you see any message in red, that's it.

      Install Firefox with the Firebug debugger.  Run the program with the debugger active to Break on All Errors, that's the name of the option.

      Don't trouble yourself with debugging after you cleaned it up with JSLint.   You can search for all this in the web.

      Satyam

      El 08/01/2010 15:29, vino ben escribió:


      In my below post ,

      what i meant by datatable renders non editable is - 

      Editable cells - do not respond to mouseover and cellClickevents


      From: vino_gallantguy <vino_gallantguy@ yahoo.co. in>
      To: ydn-javascript@ yahoogroups. com
      Sent: Fri, January 8, 2010 6:26:50 PM
      Subject: [ydn-javascript] Datatable inline cell editor fails @ times

       

      Hi,

      I have a weird issue with yui datatable. I generate a datatable with editable and non editable fields.

      -> Sometimes the whole datagrid renders non editable. And now if I try a few F5s it renders fine as editable

      This is pretty baffling as I do not know where and what to debug for. Please help me out of this mess.

      I use YUI2.7 and IE7 and a scrolling datatable.

      This is how I instantiate the table :
      myDataTable = new YAHOO.widget. ScrollingDataTab le("container" , myColumnDefs, myDataSource, {width:"95%" , height:"20em" ,formatRow: myRowFormatter} );

      Is this some sort of a bug ? Has anyone faced a similar issue before?

      Please suggest.

      Regards,
      Vinoth


      No virus found in this incoming message. Checked by AVG - www.avg.com Version: 9.0.725 / Virus Database: 270.14.129/2606 - Release Date: 01/07/10 20:35:00

    • Show all 7 messages in this topic