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

Re: DataTable + dropdown editor

Expand Messages
  • slapyo
    ... editorOptions:{dropdownOptions:YAHOO.example.Data.stateAbbrs}}, ... display ... Thanks. I thought that was what I was going to have to do.
    Message 1 of 4 , Aug 2, 2008
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, Satyam <satyam@...> wrote:
      >
      > You can assign the dropdown inline cell editor to the column. When the
      > cell is clicked, the dropdown cell editor will show.
      >
      > You can see it working in the State column in:
      >
      > http://developer.yahoo.com/yui/examples/datatable/dt_cellediting.html
      >
      > The column is defined by:
      >
      > {key:"state", editor:"dropdown",
      editorOptions:{dropdownOptions:YAHOO.example.Data.stateAbbrs}},
      >
      >
      > Where stateAbbrs is a simple array containing the strings with the two
      > letter abbreviations. DataTable can also read an array of object
      > literals with properties called text and value if the displayed value
      > and the internal value are not the same.
      >
      > You will have to provide your own formatter function to show the
      display
      > text for the stored value. The dropdown formatter and the editor don't
      > get along well, they actually overlap in functionality. If the option
      > value and description match, as in the above example, you need no
      > formatter, the stored value is the same as the one displayed. If they
      > don't match, you have to provide the formatter yourself to do the
      > conversion.
      >
      > Satyam
      >

      Thanks. I thought that was what I was going to have to do.
    Your message has been successfully submitted and would be delivered to recipients shortly.