This is a discussion on applying color to specified column in datagrid within the Flash Actionscript Programming forums, part of the Web Development category; hi, iam trying to set color for the columns using gridinstance.getColumnAt(3).setStyle("backgroundCo lor", 0xFF00AA); It ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
| |||
| hi, iam trying to set color for the columns using gridinstance.getColumnAt(3).setStyle("backgroundCo lor", 0xFF00AA); It is not working, any suggestions. |
| Sponsored Links |
| |||
| I haven't worked extensively with the datagrid, but I don't know of an easy way to change the background style of a single column. You can alternate row colors with gridInstance.setStyle("alternatingRowColors", [0xEEEEEE, 0xFFFFFF]); And you might be able to do a whole column color by using cellRenderer gridInstance.getColumnAt(1).cellRenderer = "yourCellRenderer"; The cell renderer lets you do specific stuff like put checkboxes or whatever in the fields in that column. Without digging into it further, I would guess that you can use the CellRenderer API to manipulate the background color. Pete |
| |||
| gridInstance.setStyle("alternatingRowColors", [0xEEEEEE, 0xFFFFFF]); is working. But not able to fix my problem. will try to using cell rendering.thaks once again for your suggestion. |
| |||
| Yeah, it would be nice if they had "AlternatingColumnColors" too, eh? I have seen some custom DataGrid components out there that people have put together that let you do more with individual cell colors and such. You might be able to find a free one of those. Or think about doing your own customization of the DataGrid component to do what you need. (But that's a fair amount of work, of course). Pete |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| What is the benefits of applying XSLT? | devarajan.v | XML and SOAP | 1 | 07-27-2007 09:29 AM |
| Open color picker And choosing,applying a color to a Movie Clip in Flash | oxygen | Flash Actionscript Programming | 1 | 07-25-2007 05:00 AM |
| How to hide a column in datagrid dynamically in ASP .NET? | Archer | C# Programming | 1 | 07-24-2007 12:30 AM |
| Applying CSS to Scroll Bar | raj | HTML, CSS and Javascript Coding Techniques | 1 | 07-13-2007 01:05 AM |
| changing cell color in datagrid | nssukumar | Flash Actionscript Programming | 0 | 03-16-2007 01:32 AM |