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

Re: [ydn-javascript] Re: Resizable columns in DataTable

Expand Messages
  • Eric Miraglia
    Peter, We expect to issue a bug-fix release next week; the correction to - min will be included in that release. Regards, Eric
    Message 1 of 4 , Apr 3, 2007
    • 0 Attachment
      Peter,

      We expect to issue a bug-fix release next week; the correction to -min will be included in that release.

      Regards,
      Eric


      ______________________________________________
      Eric Miraglia
      Yahoo! User Interface Library



      On Apr 3, 2007, at 9:45 AM, foti-1@... wrote:

      Ah, ok. The bug you mentioned seems to be the problem, as switching to the -debug version fixed it. Unfortunately, I don't think I'll want to use the -debug version in production (though perhaps I shouldn't even be using datatable at all, since it's "beta"). Any word on when the -min version will be fixed?

      Thanks,
      Peter

      ------------ -- Original message ------------ --------- -
      From: "andresm1981" <andresm1981@ yahoo.com>
      > The Basic example uses resizable columns (just move the mouse between
      > two table headers until the cursor changes to a resize icon...) :
      >
      > http://developer. yahoo.com/ yui/examples/ datatable/ basic.html
      >
      >
      > p.s. I noticed that in your sample code you are using
      > datatable-beta. js, but there is a bug in the current revision of
      > datatable-beta- min.js and datatable-beta. js.. where resizing does not
      > work.. Instead, try using datatabe-beta- debug.js
      >
      > --- In ydn-javascript@ yahoogroups. com, foti-1@... wrote:
      > >
      > > The API documentation makes brief mention of a 'resizable' property
      > for a DataTable column:
      > > http://developer. yahoo.com/ yui/docs/ Column.html# resizeable
      > >
      > > The DataTable page also briefly mentions this:
      > > http://developer. yahoo.com/ yui/datatable/
      > >
      > > Yet it only seems to be mentioned in passing... there are no
      > examples. Below is my own example, but I can't seem to figure out how
      > to resize the table. The cursor changes, but clicking and dragging
      > does not seem to do anything. Instead, I get a bunch of errors that
      > "newWidth is not defined" at this point in datatable-beta. js (line 4459):
      > >
      > >
      > > YAHOO.util.WidthRes izer.prototype. onDrag = function(e) {
      > >
      > > if(newWidth < this.minWidth) {
      > > newWidth = this.minWidth;
      > > }
      > >
      > >
      > > Any help would be appreciated.
      > >
      > > Thanks,
      > > Peter Foti
      > >
      > > Below is the code (not sure how well this will come through):
      > >
      > > <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
      > > "http://www.w3. org/TR/html4/ strict.dtd">
      > > <html>
      > > <head>
      > > <meta http-equiv=" Content-type" content="text/ html; charset=utf- 8">
      > > <link rel="stylesheet"
      > href="/yui/build/ datatable/ assets/datatable .css" type="text/css"
      > media="screen" >
      > > <title>Data Table</title>
      > > <script
      > src="http://yui.yahooapi s.com/2.2. 0/build/yahoo- dom-event/ yahoo-dom- event.js"
      > type="text/javascri pt"></script>
      > > <script
      > src="http://yui.yahooapi s.com/2.2. 0/build/dragdrop /dragdrop- min.js"
      > type="text/javascri pt"></script>
      > > <script
      > src="http://yui.yahooapi s.com/2.2. 0/build/datasour ce/datasource- beta-min. js"
      > type="text/javascri pt"></script>
      > > <script src="/yui/build/ datatable/ datatable- beta.js"
      > type="text/javascri pt"></script>
      > >
      > > <script type="text/javascri pt">
      > > function init() {
      > > var myColumnHeaders = [
      > > {key:"name", text:"Dog's Name", resizeable:true} ,
      > > {key:"breed" , text:"Dog's Breed", resizeable:true} ,
      > > {key:"age", text:"Dog's Age (in Weeks)", type:"number" ,
      > resizeable:true}
      > > ];
      > >
      > > var myColumnSet = new YAHOO.widget. ColumnSet( myColumnHeaders) ;
      > > var myDataTable = new
      > YAHOO.widget. DataTable( "myMarkup" ,myColumnSet) ;
      > > }
      > >
      > > YAHOO.util.Event. on(window, 'load',init) ;
      > > </script>
      > > </head>
      > > <body id="dataTable" >
      > >
      > > <div id="myMarkup" >
      > > <table id="myTable" >
      > > <thead>
      > > <tr>
      > > <th>AAA</th>
      > > <th>BBB</th>
      > > <th>1</th>
      > > </tr>
      > > </thead>
      > > <tbody>
      > > <tr>
      > > <td>aaa</td>
      > > <td>bbb</td>
      > > <td>3</td>
      > > </tr>
      > > <tr>
      > > <td>aaa</td>
      > > <td>bbb</td>
      > > <td>5</td>
      > > </tr>
      > > <tr>
      > > <td>aaa</td>
      > > <td>bbb</td>
      > > <td>7</td>
      > > </tr>
      > > </tbody>
      > > </table>
      > > </div>
      > >
      > > </body>
      > > </html>
      > >
      >
      >
      >


      From: "andresm1981" <andresm1981@...>
      Date: April 3, 2007 8:26:51 AM PDT
      Subject: [ydn-javascript] Re: Resizable columns in DataTable


      --NextPart_Webmail_9m3u9jl4l_10887_1175615363_1
      Content-Type: text/html; charset=ISO-8859-1
      Content-Transfer-Encoding: 7bit


      <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
      <html>
      <head>
      </head>

      <!-- Network content -->


      <body style="background-color: #ffffff;">



          <div id="ygrp-text">
                  <p>The Basic example uses resizable  columns (just move the mouse between<br>
      two table headers until the cursor changes to a resize icon...) :<br>
      <br>
      <a href="http://developer.yahoo.com/yui/examples/datatable/basic.html">http://developer.<wbr>yahoo.com/<wbr>yui/examples/<wbr>datatable/<wbr>basic.html</a><br>
      <br>
      p.s. I noticed that in your sample code you are using<br>
      datatable-beta.<wbr>js,  but there is a bug in the current revision of<br>
      datatable-beta-<wbr>min.js and datatable-beta.<wbr>js.. where resizing does not<br>
      work.. Instead, try using datatabe-beta-<wbr>debug.js<br>
      <br>
      --- In <a href="mailto:ydn-javascript%40yahoogroups.com">ydn-javascript@<wbr>yahoogroups.<wbr>com</a>, foti-1@... wrote:<br>
      &gt;<br>
      &gt; The API documentation makes brief mention of a 'resizable' property<br>
      for a DataTable column:<br>
      &gt; <a href="http://developer.yahoo.com/yui/docs/Column.html#resizeable">http://developer.<wbr>yahoo.com/<wbr>yui/docs/<wbr>Column.html#<wbr>resizeable</a><br>
      &gt; <br>
      &gt; The DataTable page also briefly mentions this:<br>
      &gt; <a href="http://developer.yahoo.com/yui/datatable/">http://developer.<wbr>yahoo.com/<wbr>yui/datatable/</a><br>
      &gt; <br>
      &gt; Yet it only seems to be mentioned in passing... there are no<br>
      examples.  Below is my own example, but I can't seem to figure out how<br>
      to resize the table.  The cursor changes, but clicking and dragging<br>
      does not seem to do anything.  Instead, I get a bunch of errors that<br>
      &quot;newWidth is not defined&quot; at this point in datatable-beta.<wbr>js (line 4459):<br>
      &gt; <br>
      &gt; <br>
      &gt; YAHOO.util.WidthRes<wbr>izer.prototype.<wbr>onDrag = function(e) {<br>
      &gt; <br>
      &gt; if(newWidth &lt; this.minWidth) {<br>
      &gt; newWidth = this.minWidth;<br>
      &gt; }<br>
      &gt; <br>
      &gt; <br>
      &gt;  Any help would be appreciated.<br>
      &gt; <br>
      &gt; Thanks,<br>
      &gt; Peter Foti<br>
      &gt; <br>
      &gt; Below is the code (not sure how well this will come through):<br>
      &gt; <br>
      &gt; &lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01//EN&quot;<br>
      &gt; &quot;<a href="http://www.w3.org/TR/html4/strict.dtd">http://www.w3.<wbr>org/TR/html4/<wbr>strict.dtd</a>&quot;&gt;<br>
      &gt; &lt;html&gt;<br>
      &gt; &lt;head&gt;<br>
      &gt; &lt;meta http-equiv=&quot;<wbr>Content-type&quot; content=&quot;text/<wbr>html; charset=utf-<wbr>8&quot;&gt;<br>
      &gt; &lt;link rel=&quot;stylesheet&quot;<br>
      href=&quot;/yui/build/<wbr>datatable/<wbr>assets/datatable<wbr>.css&quot; type=&quot;text/css&quot;<br>
      media=&quot;screen&quot; &gt;<br>
      &gt; &lt;title&gt;Data Table&lt;/title&gt;<br>
      &gt; &lt;script<br>
      src=&quot;<a href="http://yui.yahooapis.com/2.2.0/build/yahoo-dom-event/yahoo-dom-event.js">http://yui.yahooapi<wbr>s.com/2.2.<wbr>0/build/yahoo-<wbr>dom-event/<wbr>yahoo-dom-<wbr>event.js</a>&quot;<br>
      type=&quot;text/javascri<wbr>pt&quot;&gt;&lt;/script&gt;<br>
      &gt; &lt;script<br>
      src=&quot;<a href="http://yui.yahooapis.com/2.2.0/build/dragdrop/dragdrop-min.js">http://yui.yahooapi<wbr>s.com/2.2.<wbr>0/build/dragdrop<wbr>/dragdrop-<wbr>min.js</a>&quot;<br>
      type=&quot;text/javascri<wbr>pt&quot;&gt;&lt;/script&gt;<br>
      &gt; &lt;script<br>
      src=&quot;<a href="http://yui.yahooapis.com/2.2.0/build/datasource/datasource-beta-min.js">http://yui.yahooapi<wbr>s.com/2.2.<wbr>0/build/datasour<wbr>ce/datasource-<wbr>beta-min.<wbr>js</a>&quot;<br>
      type=&quot;text/javascri<wbr>pt&quot;&gt;&lt;/script&gt;<br>
      &gt; &lt;script src=&quot;/yui/build/<wbr>datatable/<wbr>datatable-<wbr>beta.js&quot;<br>
      type=&quot;text/javascri<wbr>pt&quot;&gt;&lt;/script&gt;<br>
      &gt; <br>
      &gt; &lt;script type=&quot;text/javascri<wbr>pt&quot;&gt;<br>
      &gt; function init() {<br>
      &gt; var myColumnHeaders = [<br>
      &gt; {key:&quot;name&quot;, text:&quot;Dog's Name&quot;, resizeable:true}<wbr>,<br>
      &gt; {key:&quot;breed&quot;<wbr>, text:&quot;Dog's Breed&quot;, resizeable:true}<wbr>,<br>
      &gt; {key:&quot;age&quot;, text:&quot;Dog's Age (in Weeks)&quot;, type:&quot;number&quot;<wbr>,<br>
      resizeable:true}<br>
      &gt; ];<br>
      &gt; <br>
      &gt; var myColumnSet = new YAHOO.widget.<wbr>ColumnSet(<wbr>myColumnHeaders)<wbr>;<br>
      &gt; var myDataTable = new YAHOO.widget.<wbr>DataTable(<wbr>&quot;myMarkup&quot;<wbr>,myColumnSet)<wbr>;<br>
      &gt; }<br>
      &gt; <br>
      &gt; YAHOO.util.Event.<wbr>on(window,<wbr>'load',init)<wbr>;<br>
      &gt; &lt;/script&gt;<br>
      &gt; &lt;/head&gt;<br>
      &gt; &lt;body id=&quot;dataTable&quot;<wbr>&gt;<br>
      &gt; <br>
      &gt; &lt;div id=&quot;myMarkup&quot;<wbr>&gt;<br>
      &gt;     &lt;table id=&quot;myTable&quot;<wbr>&gt;<br>
      &gt;         &lt;thead&gt;<br>
      &gt;             &lt;tr&gt;<br>
      &gt;                 &lt;th&gt;AAA&lt;/th&gt;<br>
      &gt;                 &lt;th&gt;BBB&lt;/th&gt;<br>
      &gt;                 &lt;th&gt;1&lt;/th&gt;<br>
      &gt;             &lt;/tr&gt;<br>
      &gt;         &lt;/thead&gt;<br>
      &gt;         &lt;tbody&gt;<br>
      &gt;             &lt;tr&gt;<br>
      &gt;                 &lt;td&gt;aaa&lt;/td&gt;<br>
      &gt;                 &lt;td&gt;bbb&lt;/td&gt;<br>
      &gt;                 &lt;td&gt;3&lt;/td&gt;<br>
      &gt;             &lt;/tr&gt;<br>
      &gt;             &lt;tr&gt;<br>
      &gt;                 &lt;td&gt;aaa&lt;/td&gt;<br>
      &gt;                 &lt;td&gt;bbb&lt;/td&gt;<br>
      &gt;                 &lt;td&gt;5&lt;/td&gt;<br>
      &gt;             &lt;/tr&gt;<br>
      &gt;             &lt;tr&gt;<br>
      &gt;                 &lt;td&gt;aaa&lt;/td&gt;<br>
      &gt;                 &lt;td&gt;bbb&lt;/td&gt;<br>
      &gt;                 &lt;td&gt;7&lt;/td&gt;<br>
      &gt;             &lt;/tr&gt;<br>
      &gt;         &lt;/tbody&gt;<br>
      &gt;     &lt;/table&gt;<br>
      &gt; &lt;/div&gt;<br>
      &gt; <br>
      &gt; &lt;/body&gt;<br>
      &gt; &lt;/html&gt;<br>
      &gt;<br>
      <br>
      </p>
          </div>  


      </body>

      </html><!--End group email -->


      --NextPart_Webmail_9m3u9jl4l_10887_1175615363_1--




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