Re: [ydn-javascript] Re: DataTable Editor using the TAB key to move to the next cell
Hi,
Satyam, do you have any good idea of how to do this ?
Regards,
--- Στις Δευτ., 19/10/09, ο/η Matt <matt@...> έγραψε:
Από: Matt <matt@...> Θέμα: [ydn-javascript] Re: DataTable Editor using the TAB key to move to the next cell Προς: ydn-javascript@yahoogroups.com Ημερομηνία: Δευτέρα, 19 Οκτώβριος 2009, 14:06
Thoughts, but haven't tried any of this, and I don't think there's anything built in:
- add an event listener for the tab key to your editor
- work out which cell you're in
- show the editor for the next cell
Obviously there'll be a bit of extra work to go down to the next line, or stop at the last cell of the last row.
Editors have a 'keydownEvent' which you can subscribe to to listen for a tab, something like:
However I'm not sure what the best way to add a listener to all editors is... maybe someone else has a good idea?
If you call datatable.getCellEd itor() before it's hidden, you'll get the current one (or you can pass the editor in your listener to the function that does the cell moving), which then has a bunch of methods giving you access to the current record, td, and datatable itself etc - look at http://developer. yahoo.com/ yui/docs/ YAHOO.widget. BaseCellEditor. html which should be enough to work out where to go next.
Sorry if this is telling you what you already know.
Matt
--- In ydn-javascript@ yahoogroups. com, "George" <sdancer75@. ..> wrote:
>
> Any recommendation or thought ?
>
> Regards,
>
> --- In ydn-javascript@ yahoogroups. com, "George" <sdancer75@> wrote:
> >
> > Hi,
> >
> > Is that possible to use keyboard shortcuts for moving among cells when using inline cell editing mode?
> >
> > Regards,
> >
>
__________________________________________________ Χρησιμοποιείτε Yahoo!; Βαρεθήκατε τα ενοχλητικά μηνύματα (spam); Το Yahoo! Mail διαθέτει την καλύτερη δυνατή προστασία κατά των ενοχλητικών μηνυμάτων http://mail.yahoo.gr
Thoughts, but haven't tried any of this, and I don't think there's anything built in: - add an event listener for the tab key to your editor - work out which...
I guess I'll have to figure out something, there is too many people asking for this. See: http://www.satyam.com.ar/yui/2.7.0/keynav.html It is just a first...
Thank you Satyam, it worked without problems to me. The only situation I have is with my custom drop down menus insde the table (the one that the content are...
I forgot to call stopEvent when the key is one I want to deal with. This was causing some issues, like the cell editor for the radio buttons now showing up. I...
Satyam the custom drop down menus still does not have the focus. Any recommendation ? Is there anyway to make (select) by default the string inside the inline...
... Not really, do you have a working sample I can take a look at? ... The code for method focus of TextboxCellEditor does it, or so it would seem: /** * Sets...
Satyam you can download a working example at http://rapidshare.com/files/302328748/Satyam.zip.html This sample implicate DataBase retriving data. You can...
I could try your code because it had some PHP includes that I don't have. Anyway, I would say, don't bother. I tried textbox cell editors in IE, Safari,...
Can you try adding the following code in your page: YAHOO.widget.TextboxCellEditor.prototype.focus = function () { this.getDataTable()._focusEl(this.textbox); ...
Satyam, I will try your code today afternoon. The code I send to you, concerns the custom drop down menus and not the selected text in the text editor. The php...