PDA

View Full Version : Grids in Tabs and grid with both editing and drag and drop



glassy
19 Nov 2006, 2:23 AM
I've got 2 grids loading from xml on the same page working now.
I've applied separate columns css.

My questions are:

1. Is it possible to put the 2 grids into separate tabs? By tabs, I mean using simple TabPanels like in http://www.jackslocum.com/yui/2006/08/26/a-javascript-tabpanel-for-yahoo-ui/ (not using BorderLayout). I've tried and the result was that sometimes the headers on the second tab doesn't show and sometimes the rows don't show depending on the browser.

2. I've tried out the EditorGrid .. I'm wondering how to allow it to handle both edits and drag and drops.

BTW Thanks a lot for yui-ext!! Fantastic work!

jack.slocum
19 Nov 2006, 2:31 AM
1. The grid can't be rendered into an element with display:none. Inactive tabs currently use display none. I will be (95% sure) putting out RC2 tomorrow and the tab panel no longer uses display:none. This should solve all tab+grid problems.

2. You can use an EditorAndSelectionModel (requires a double click to edit) to enable selections + edits. If you do a search there a couple good threads on it. Also, if you look in the extras forum, there's a selection model that supports edits, selections and still supports arrow navigation as well.

The EditorGrid class is just a shortcut that creates an EditorSelectionModel for you. You would create a standard Grid object and pass in one of the selection models described above.

glassy
19 Nov 2006, 2:42 AM
Thank you!! :)