Skip to search.
ydn-javascript · Yahoo! User Interface Library Group

Group Information

  • Members: 10919
  • Category: JavaScript
  • Founded: Dec 15, 2005
  • Language: English
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Messages

  Messages Help
Advanced
DataTable Editor using the TAB key to move to the next cell   Message List  
Reply Message #51964 of 52481 |
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:

editor.on( "keydown" , function(e){ if(e.keyCode == 13 ){ gotoNextCell( ); }} )

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

Sat Oct 24, 2009 7:39 am

sdancer75
Offline Offline
Send Email Send Email

Message #51964 of 52481 |
Expand Messages Author Sort by Date

Hi, Is that possible to use keyboard shortcuts for moving among cells when using inline cell editing mode? Regards,...
George
sdancer75 Offline Send Email
Oct 16, 2009
3:20 pm

Any recommendation or thought ? Regards,...
George
sdancer75 Offline Send Email
Oct 19, 2009
8:54 am

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...
Matt
mattatlamplight Offline Send Email
Oct 19, 2009
11:07 am

Hi, Satyam, do you have any good idea of how to do this ? Regards, ... Από: Matt <matt@...> Θέμα: [ydn-javascript] Re: DataTable Editor...
George Papaioannou
sdancer75 Offline Send Email
Oct 24, 2009
7:39 am

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...
Satyam
satyamutsa Online Now Send Email
Oct 24, 2009
3:52 pm

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...
George Papaioannou
sdancer75 Offline Send Email
Oct 27, 2009
8:00 am

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
satyamutsa Online Now Send Email
Oct 28, 2009
6:15 pm

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...
George Papaioannou
sdancer75 Offline Send Email
Nov 3, 2009
3:23 pm

... 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
satyamutsa Online Now Send Email
Nov 3, 2009
6:03 pm

Satyam you can download a working example at http://rapidshare.com/files/302328748/Satyam.zip.html This sample implicate DataBase retriving data. You can...
George Papaioannou
sdancer75 Offline Send Email
Nov 4, 2009
2:20 pm

Hi Satyam, In Chrome the following code does not set the focus to the inline cell texteditor Β Β  Β  Β  Β  Β  Β  Β  Β  Β ...
George Papaioannou
sdancer75 Offline Send Email
Nov 4, 2009
4:15 pm

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,...
Satyam
satyamutsa Online Now Send Email
Nov 4, 2009
7:22 pm

I meant I could NOT try your code....
Satyam
satyamutsa Online Now Send Email
Nov 4, 2009
8:09 pm

Can you try adding the following code in your page: YAHOO.widget.TextboxCellEditor.prototype.focus = function () { this.getDataTable()._focusEl(this.textbox); ...
Satyam
satyamutsa Online Now Send Email
Nov 4, 2009
8:51 pm

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...
George Papaioannou
sdancer75 Offline Send Email
Nov 5, 2009
7:18 am
Advanced

Copyright © 2010 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines NEW - Help