preOpen - which cell edit triggered the event?

preOpen - which cell edit triggered the event?

gjastrabgjastrab Posts: 3Questions: 1Answers: 0

When using the "onOpen" event, it is relatively easy to know which cell is being edited:

$('div.DTE');

Is there any way to know when you're in preOpen? I see that it has a jQuery event object but I don't think that object has the information I'm looking for.

My goal is just to prevent a specific cell from opening based on a td class. This seems like the right method to halt the edit, but if there's a better solution please let me know. Thanks!

Answers

  • gjastrabgjastrab Posts: 3Questions: 1Answers: 0

    Seems a better solution is just to ensure that the td doesn't get a listener in the first place.

             $('#<%= grid_id %>').on( 'click', 'tbody td:not(.readonly)', function (e) {
                editor.inline( this );
              } );
    
  • allanallan Posts: 63,523Questions: 1Answers: 10,473 Site admin

    Hi,

    Agreed - I think the solution you posted above is probably the best option!

    Regards,
    Allan

This discussion has been closed.