Sure, but not in any official way. It will get sized to its column, but could choose to ignore that value and reach across to the next column. It knows what its column is so it could easily get the next column's size, then it can hide the other column's renderer.
However, in a prototype I did, we really just created a single column that looked like two column. One reason for doing that is so that the header spans the column better and the resizing of the two halves of the column could be customized. For example if I have: User Name First | Last as the column header, I don't want the separator between First and Last to work like other column separators because I don't really want to be able to resize the First/Last columns arbitrarily like I can other columns I just want the range of sizes to be within the size of the UserName column. So (I never finished the prototype), we would make a custom header that has a User Name label, First and Last labels and custom separator and separator drag logic and that really is just one column. The column would be a subclass of DGColumn that has a value for the width of the First column. The renderer for that column knows to look for that value and divide its two sub regions appropriately. -Alex ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gareth Edwards Sent: Wednesday, November 22, 2006 3:41 PM To: [email protected] Subject: Re: [flexcomponents] Custom Datagrid component. Can a custom datagrid renderer span columns? Cheers Gareth. Alex Harui wrote: It depends on the data. Sometimes the data is hierarchical and can be linearized (Tree sort of does this). I've experimented with custom collections that fake rows where you need them and custom renderers that know when you display the spanning rows. I still think that's the right track, but haven't proven it out. -Alex ________________________________ From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Gareth Edwards Sent: Wednesday, November 22, 2006 1:34 PM To: [email protected] Subject: [flexcomponents] Custom Datagrid component. I have seen a couple of different custom datagrid components, and was wondering has anyone come up with a custom datagrid that allows sub headers (possibly just descriptive headers that span all columns when a specified data key changes?. ie. abc - this is the abc description 1,abc 2,abc 3,abc bcd - this is the bcd description 4,bcd 5,bcd 6,bcd I have started looking at how this might be achieved, please let me know if someone has come up with something like this already, or give me thoughts on how you think I could implement this. Is extending the base datagrid class and possibly overriding functions on the right track? Cheers Gareth.
