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

45901Re: YUI datatable delete/edit

Expand Messages
  • cjavajim
    Mar 3, 2009
    • 0 Attachment
      --- In ydn-javascript@yahoogroups.com, "seyed_7" <seyed_7@...> wrote:
      >
      > Thanks a lot satyam,
      > I've actually tried that one. For example, the column with the delete
      > image is defined in
      > var myColumnDefs =
      > [{key:'id',field:'id',label:'#'},{key:'Connector',field:'Connector',
      > label:'Connector Name'},{key:'Description',field:'Description',
      > label:'Description'},{key:'Date_Created',field:'Date_Created',label:'C
      > reated On'},{key:'Last_Run',field:'Last_Run',label:'Last Run'},
      > {key:'viewImage',label:'View',
      > className:'view'},{key:'editImage',label:'Edit',
      > className:'edit'},{key:'deleteImage',label:'Delete',
      > className:'delete'}];
      >
      > as
      >
      > {key:'deleteImage',label:'Delete', className:'delete'}
      >
      > So I tried all three values meaning i manipulated the code to do the
      > following
      >
      > myDataTable.on('cellClickEvent',function (oArgs) {
      > // 'this' is already referring to the DataTable
      > var target = oArgs.target;
      > var record = this.getRecord(target);
      > var column = this.getColumn(target);
      > switch (column.key) {
      > case 'deleteImage':
      > alert("1111");
      > break;
      > case 'Delete':
      > alert("2222");
      > break;
      > case 'delete':
      > alert("3333");
      > break;
      > default:
      > alert("7777");
      > break;
      > }
      > });
      >
      >
      > But not even a heart beat. What am I doing wrong. I was up pretty
      > late last night trying to figure this one out.
      >
      > Thanks a lot,

      Did you "subscribe" to the "cellClickEvent" ? E.g.:

      myDataTable.subscribe('cellClickEvent', ...
    • Show all 8 messages in this topic