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

Single Cell Selection from a data table : How to disable cell selection !

Expand Messages
  • sdancer75
    Hi, Is there any way to disable the selection from a specific cells? For example all cells from the 1st and 3rd Column of the data table. Regards, George
    Message 1 of 3 , May 4, 2009
    • 0 Attachment
      Hi,

      Is there any way to disable the selection from a specific cells? For example all cells from the 1st and 3rd Column of the data table.


      Regards,
      George
    • satyam@satyam.com.ar
      Normally, you plug the built-in event listener for cell selection directly to the click event. However, you can mediate in that. You put your own listener
      Message 2 of 3 , May 4, 2009
      • 0 Attachment
        Normally, you plug the built-in event listener for cell selection directly
        to the click event. However, you can mediate in that. You put your own
        listener for the clickEvent, read the column from there and if the column
        key is that of any column you want to ignore, you simply return, otherwise
        you do pass that event over to the built-in listener.

        I have my machine at the repair shop so I'm a little handicapped right now
        so I'll write this just from memory and hope it works:

        myDataTable.on('cellClickEvent',function(oArgs) {
        var target = oArgs.target;
        var column = this.getColumn(target);
        if (column.key == 'keyOfColumnToIgnore') return;
        this.onEventSelectCell.apply(this,arguments);
        });

        Satyam


        On Mon, 04 May 2009 12:07:32 -0000, "sdancer75" <sdancer75@...> wrote:
        > Hi,
        >
        > Is there any way to disable the selection from a specific cells? For
        > example all cells from the 1st and 3rd Column of the data table.
        >
        >
        > Regards,
        > George
        >
        >
        >
        > ------------------------------------
        >
        > Yahoo! Groups Links
        >
        >
        >
      • sdancer75
        Thank you for your reply. Please if you get your computer back send me a workable example. Will you do this for me ? Regards, George
        Message 3 of 3 , May 4, 2009
        • 0 Attachment
          Thank you for your reply.

          Please if you get your computer back send me a workable example. Will you do this for me ?

          Regards,
          George

          --- In ydn-javascript@yahoogroups.com, <satyam@...> wrote:
          >
          >
          > Normally, you plug the built-in event listener for cell selection directly
          > to the click event. However, you can mediate in that. You put your own
          > listener for the clickEvent, read the column from there and if the column
          > key is that of any column you want to ignore, you simply return, otherwise
          > you do pass that event over to the built-in listener.
          >
          > I have my machine at the repair shop so I'm a little handicapped right now
          > so I'll write this just from memory and hope it works:
          >
          > myDataTable.on('cellClickEvent',function(oArgs) {
          > var target = oArgs.target;
          > var column = this.getColumn(target);
          > if (column.key == 'keyOfColumnToIgnore') return;
          > this.onEventSelectCell.apply(this,arguments);
          > });
          >
          > Satyam
          >
          >
          > On Mon, 04 May 2009 12:07:32 -0000, "sdancer75" <sdancer75@...> wrote:
          > > Hi,
          > >
          > > Is there any way to disable the selection from a specific cells? For
          > > example all cells from the 1st and 3rd Column of the data table.
          > >
          > >
          > > Regards,
          > > George
          > >
          > >
          > >
          > > ------------------------------------
          > >
          > > Yahoo! Groups Links
          > >
          > >
          > >
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.