Search the web
Sign In
New User? Sign Up
ydn-javascript · Yahoo! User Interface Library Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Click here for the latest updates on Groups Message search

Messages

  Messages Help
Advanced
Inline cell editor position   Topic List   < Prev Topic  |  Next Topic >
Reply  |  Next Message > 
Re: [ydn-javascript] Inline cell editor position


Thanks very much Satyam. Your inputs have saved my day.

This is what I have done.

In the move() function - I get the height of the td element and calculate the Y for the container top and set it 
move : function() {
                var elTd = this.getTdEl();
  this.textbox.style.width = this.getTdEl().offsetWidth + "px";
YAHOO.widget.TextAutoComplete.superclass.move.call(this);
        
       var y = YAHOO.util.Dom.getY(elTd);
        this.getContainerEl().style.top = (y+ (elTd.offsetHeight/2) - 11.5) + "px";

}
Regards,
Vinoth

From: Satyam <satyam@...>
To: ydn-javascript@yahoogroups.com
Sent: Wed, December 16, 2009 10:04:26 PM
Subject: Re: [ydn-javascript] Inline cell editor position

 

The editorShowEvent will fire after the editor is shown and it provides
you a reference to the cell editor.

http://developer. yahoo.com/ yui/docs/ YAHOO.widget. DataTable. html#event_ editorShowEvent

You would then need to find out if the editor is the one that
corresponds to the column you want:

http://developer. yahoo.com/ yui/docs/ YAHOO.widget. DataTable. html#event_ editorShowEvent

and if so, adjust the height of the container:

http://developer. yahoo.com/ yui/docs/ YAHOO.widget. BaseCellEditor. html#method_ getContainerEl

to that of the cell:

http://developer. yahoo.com/ yui/docs/ YAHOO.widget. BaseCellEditor. html#method_ getTdEl

You can also adjust the size of the input box:

http://developer. yahoo.com/ yui/docs/ YAHOO.widget. TextboxCellEdito r.html#property_ textbox

or, if you are feeling courageous, redefine method move to do it all.

http://developer. yahoo.com/ yui/docs/ YAHOO.widget. TextboxCellEdito r.html#method_ move

Satyam

vino_gallantguy escribió:
> Hi ,
>
> I have a datatable with textbox cell editor. Data in the cell sometimes spans over multiple lines, and when i click on it the textbox cell editor pops up right at the top of the cell,which looks real odd.
>
> I'm trying to figure out a way to make the editor pop up right at the center of the cell. Can anyone suggest how this can be done ?
>
> I tried padding, but that will not work as the size of my cell varies dynamically based on the data.
>
> Please suggest.
>
>
> Regs,
> Vino
>
>
>
>
>
>
> ------------ --------- --------- ------
>
> Yahoo! Groups Links
>
>
>
> ------------ --------- --------- --------- --------- --------- -
>
>
> No virus found in this incoming message.
> Checked by AVG - www.avg.com
> Version: 9.0.716 / Virus Database: 270.14.109/2567 - Release Date: 12/15/09 20:58:00
>
>




Fri Dec 18, 2009 2:43 pm

vino_gallantguy
Offline Offline
Send Email Send Email

 |  Next Message > 
Expand Messages Author Sort by Date

Hi , I have a datatable with textbox cell editor. Data in the cell sometimes spans over multiple lines, and when i click on it the textbox cell editor pops up...
vino_gallantguy
Offline Send Email
Dec 16, 2009
3:47 pm

The editorShowEvent will fire after the editor is shown and it provides you a reference to the cell editor. ...
Satyam
satyamutsa
Offline Send Email
Dec 16, 2009
4:35 pm

Thanks very much Satyam. Your inputs have saved my day. This is what I have done. In the move() function - I get the height of the td element and calculate the...
vino ben
vino_gallantguy
Offline Send Email
Dec 18, 2009
2:43 pm
Advanced

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