Hi,
My question is about achieving the ‘Fixed-Table-Header’ effect using GridLayout.
Because I couldn’t find any other way to do it, I have two GridLayouts - the top one is the ‘header’ and the bottom one is the ‘data’. They both have the same number of columns.
I wrap the bottom ‘data’ grid in a Panel, and everything works great - the bottom grid scrolls, leaving the top header intact.
Here’s where it gets interesting - if a user clicks on an item in the data grid, it expands to show some editable stuff (text areas, checkboxes etc.). This works fine as long as I stay clear of animating widgets like Depot etc. (I do really like Depot btw, it just doesn’t play well with GridLayout).
The trouble is how to tell the header GridLayout to also expand its column(s) to the same width as the data grid, and do it on the server side.
With a client-side widget, I suppose they could be linked to get the widths and sync up that way, but I haven’t got any of that.
I can and have setup listeners etc between the two, but the server doesn’t know what the widths are at the time of an item click, that’s of course done on the client when it renders the page. Maybe if the server was notified when it finished rendering the ‘data’ Grid, I could catch that and update the header (i.e. a 2-pass render…sounds messy).
Does anyone know of a way/add-on/technique to link gridlayouts or to achieve the effect of a fixed Table header using gridlayout?
Many thanks,
Peter