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

33672Re: [ydn-javascript] Hidden columns in DataTable....

Expand Messages
  • Satyam
    Jul 2, 2008
    • 0 Attachment
      The columns should be narrow strips on the right hand side of the table,
      not the left. If that is the case, that is fine, hidden columns are
      meant to be hinted at so the user can eventually shown them by means you
      should provide.

      If you don't mean to ever show those columns, don't declare them in the
      column definitions. If they are declared in
      theDataSource.responseSchema.fields array, the values will be available
      in the RecordSet for you to use and the columns won't be shown at all.

      Satyam


      santini.alberto wrote:
      > Hello.
      >
      > I modified the basic example of DataTable control adding 5 hidden
      > columns. As you'll see there are, at the left of the datatable, 5
      > strips. Am I missing something? Or is it the annoying problem of the
      > minWidth (just noticed in the last weeks in the forum)?
      >
      >
      > <script type="text/javascript">
      > /*global YAHOO */
      > YAHOO.util.Event.addListener(window, "load", function () {
      > YAHOO.example.Basic = function () {
      > var myColumnDefs = [
      > {key: "id", sortable: true, resizeable: true},
      > {key: "date", formatter:
      > YAHOO.widget.DataTable.formatDate, sortable: true, sortOptions:
      > {defaultDir: YAHOO.widget.DataTable.CLASS_DESC}, resizeable: true},
      > {key: "quantity", formatter:
      > YAHOO.widget.DataTable.formatNumber, sortable: true, resizeable: true},
      > {key: "amount", formatter:
      > YAHOO.widget.DataTable.formatCurrency, sortable: true, resizeable: true},
      > {key: "title", sortable: true, resizeable: true},
      > {key: "h1", hidden: true},
      > {key: "h2", hidden: true},
      > {key: "h3", hidden: true},
      > {key: "h4", hidden: true},
      > {key: "h5", hidden: true}
      > ];
      >
      > this.myDataSource = new YAHOO.util.DataSource([
      > {id: "po-0167", date: new Date(1980, 2, 24), quantity: 1,
      > amount: 4, title: "A Book About Nothing"},
      > {id: "po-0783", date: new Date("January 3, 1983"),
      > quantity: null, amount: 12.12345, title: "The Meaning of Life"},
      > {id: "po-0297", date: new Date(1978, 11, 12), quantity:
      > 12, amount: 1.25, title: "This Book Was Meant to Be Read Aloud"},
      > {id: "po-1482", date: new Date("March 11, 1985"),
      > quantity: 6, amount: 3.5, title: "Read Me Twice"}
      > ]);
      > this.myDataSource.responseType =
      > YAHOO.util.DataSource.TYPE_JSARRAY;
      > this.myDataSource.responseSchema = {
      > fields: ["id", "date", "quantity", "amount", "title"]
      > };
      >
      > this.myDataTable = new YAHOO.widget.DataTable("basic",
      > myColumnDefs, this.myDataSource, {caption: "DataTable
      > Caption"});
      > }();
      > });
      > </script>
      >
      >
      > Thanks in advance,
      > Alberto Santini
      >
      >
      > ------------------------------------
      >
      > Yahoo! Groups Links
      >
      >
      >
      > ------------------------------------------------------------------------
      >
      >
      > No virus found in this incoming message.
      > Checked by AVG.
      > Version: 8.0.101 / Virus Database: 270.4.3/1529 - Release Date: 01/07/2008 19:23
      >
    • Show all 8 messages in this topic