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

Re: can't get oldIndex parameter to work in columnReorderEvent

Expand Messages
  • emz452
    For anyone else that comes across this problem, I checked the source code and appears to be a bug. Have submitted a bug for this here:
    Message 1 of 3 , Apr 29, 2009
    • 0 Attachment
      For anyone else that comes across this problem, I checked the source code and appears to be a bug.

      Have submitted a bug for this here:
      http://yuilibrary.com/projects/yui2/ticket/2527962


      --- In ydn-javascript@yahoogroups.com, "emz452" <emz452@...> wrote:
      >
      > hi again,
      >
      > sorry, just bringing this up again - hoping someone might've used the columnReorderEvent ...
      >
      > Really can't figure out what I'm doing wrong. I've created a separate page, reduced the code down to a fairly bare boned and it's still happening, so it's nothing to do with other YUI elements or code on that same page.
      >
      > I'm hoping there's an obvious error I'm making somewhere...
      >
      > Otherwise, are there any other YUI forums out there I could try?
      >
      > thx!
      >
      > --- In ydn-javascript@yahoogroups.com, "emz452" <emz452@> wrote:
      > >
      > > Hi there,
      > >
      > > I have a datatable with re-orderable columns.
      > >
      > > However, when I try to use the columnReorderEvent, I can't seem to
      > > access the args.oldIndex as specified here:
      > > http://developer.yahoo.com/yui/docs/YAHOO.widget.DataTable.html
      > >
      > > I have successfully been able to use the args.width parameter in
      > > columnResizeEvent.
      > >
      > > If anyone can enlighten me as to where I'm going wrong, it would be
      > > greatly appreciated.
      > >
      > > My code is as follows (assuming dt is the YUI DataTable):
      > >
      > > // args.column works, but args.oldIndex does NOT work
      > > dt.subscribe('columnReorderEvent', function(args) {
      > > alert("the "+args.column.key+" column was re-orderd to: "
      > > + args.oldIndex);
      > > })
      > >
      > > // both args.column and args.width work in this case
      > > dt.subscribe('columnResizeEvent', function(args) {
      > > alert("the "+args.column.key+" column was resized to: " +
      > > args.width);
      > > })
      > >
      > >
      > > Many thanks,
      > > Emily
      > >
      >
    Your message has been successfully submitted and would be delivered to recipients shortly.