Flex Advanced data grid:column visibility - apache-flex

HI
I am new to Flex and was wondering, when we use an advanced data grid, only when we click on the parent element the children details get populated in the corresponding columns, right?..SO now i have made the empty columns invisible(at design) now how do i make them visible at run time when the parent element is expanded..similarly once the columns are visible, how can i make them invisible again when the parent element is closed.
Please help me out
Thanks

I think the event you want to listen for is "itemOpen" then the function you want will be something like:
MyADG.columns[invisible column index].visible=true;

Related

How do you make an expanded row in Material Design Lite Data Table

I would like to create a mdl-data-table such that when I click on it.
My guess is just to add a row with colspan == number of columns when I choose to expand the row. I was wondering if there was a better version than that. Something that makes it look like that it is expanded with some existing styles rather than creating a new style.
In addition, if it can be "animated" as a slide down that pushes the other elements that would be a bonus.
Note the answer does not have to handle the clicking part, but just the "expanded" part

Lightbox or modal style effect for row in a table

I have a table (rendered using datatables.js) that shows some information.
When a user clicks on a button in the row, i open (which add a new tr) to the table.
I then show some fields in the new row including an confirm/cancel button.
What I'm trying to do is make it so that I can keep the user input on the row and disable everything with a given parent div, excluding the new row.
I can only think of using z-index, making the tr a high z-index and adding a new div to the parent position:absolute, at 0,0. Is that the correct way to go about it? Is giving tr a high z index correct?
using HTML5/CSS3 (Jquery)
thanks
sam
This can be done in so many ways. Here is one.
http://jsfiddle.net/Ktk9U/

Flex list sorting animation?

I have a list which displays votes cast on things in a descending order (=the dataprovider has a sort assigned).
The elements have variable height, but there are not so many elements, so i do not need to use a virtual layout
My problem is that this list needs to be updated real-time and i want to make this happen with a nice animation.
(e.g. if an item overtakes another by votes, then they swap places.)
Anyone knows how to make this animation with Flex 4.5 (spark list)?
Do i need to write a custom layout?
Thanks
If I were you, I'd just create a custom component which would have a simple layout (VGroup, maybe within a Scroller if you need a scrollbar) which then dynamically add item renderers to it. The thing about this one though is that your item renderer never changes it's data property. Make sure that the item renderer uses binding for it's data, and then on whatever you're sorting, have an animation between indexes of 2 items, make sure you set 'includeInLayout=false' before the animation for both items and just tween between their positions.
There are other ways of doing it using List, but then you'd have to make duplicates of the item renderers for the animations while the real ones are hidden and change their values. Not sure which one would be best in this case...

Resizing columns in adobe flex AdvancedDataGrid

I'm using an AdvancedDataGrid without the header row (AdvancedDataGrid.showHeaders="false"), my AdvancedDataGrid has 2 columns, where the first one will show a hierarchical data (tree).
The tree may be very long and very deep or may contain a long string in the node label so the user will not be able to see the whole vale of the tree node, I want to be able to resize the column using the vertical separator of the gris (the one displayed/separates between columns) or to be able to define a horizontal scroll bar only for the first column!
How can I accomplish this?!....Any idea ?!
Try to set the Advanced Datagrid tag's attribute 'wordWrap="true"'.

Flex: change item Style on certain Tree based ItemRenderers

I have a question concerning Tree items. I want to show where a drop action would be placed... The item will be placed in between two existing elements. So what I want to do is, to take the upper item and draw a line underneath it. But I struggling to address the itemRenderer...
I have the index for the itemrenderer, but I dont get a instance of that object.
Any help is appreciated!
Markus
If you're doing drag & drop right, it should be showing a line where you are going to drop the dragItem. That is standard behavior. You shouldn't have to do that in the itemRenderer.

Resources