> Customers 123
- Melbourne (2)
- Brisbane (119)
- Darwin (2)
- Processing 5
Requirement:
- Not every row needs a drop down, in this case, only the first row
- A grand total of all the items' total is displayed at the parent (bold) row
- Data Table is preferred to display the data
However, my solution falls between DataTableControl: Row Expansion and Nested DataTables. I use this version of rowexpansion.js for my assignment.
Solution
End result |
References
- If DataTable's width is set to 100%, column width will be ignored in YUI2. Here's the workaround.- Set the CSS property "width: 100%" for either the DataTable's table tag, or the div that contains the DataTable.
- Set the "width" DataTable column property to the number of pixels you want specifically per column.
- Set the "minWidth" DataTable column property to a ridiculously enormous number per columns you want auto-sized.
var myColumnDefs = [
{key:"foo", width: 20},
{key:"bar", minWidth: 999999 },
];
new YAHOO.widget.DataTable("someContainer", myColumnDefs, myDataSource);
Nice article but can i have a live demo or working example code including HTML and CSS. I'm a newbie to the UI world.
ReplyDelete