IT Community - Software Programming, Web Development and Technical Support

applying color to specified column in datagrid

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 ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Web Development > Flash Actionscript Programming

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 03-21-2007, 08:04 AM
nssukumar nssukumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Posts: 155
nssukumar is on a distinguished road
Default applying color to specified column in datagrid

hi,
iam trying to set color for the columns using

gridinstance.getColumnAt(3).setStyle("backgroundCo lor", 0xFF00AA);

It is not working, any suggestions.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-21-2007, 10:39 AM
Reverend Reverend is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 84
Reverend is on a distinguished road
Default Re: applying color to specified column in datagrid

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
__________________
Reverend Pete
Code Of Paint
Learn to program using Flash
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 03-21-2007, 10:57 PM
nssukumar nssukumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Posts: 155
nssukumar is on a distinguished road
Default Re: applying color to specified column in datagrid

hi,
Thanks for your suggestion,i will work on it and let you know.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 03-21-2007, 11:11 PM
nssukumar nssukumar is offline
D-Web Sr.Programmer
 
Join Date: Feb 2007
Posts: 155
nssukumar is on a distinguished road
Default Re: applying color to specified column in datagrid

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.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 03-22-2007, 10:31 AM
Reverend Reverend is offline
D-Web Programmer
 
Join Date: Mar 2007
Posts: 84
Reverend is on a distinguished road
Default Re: applying color to specified column in datagrid

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
__________________
Reverend Pete
Code Of Paint
Learn to program using Flash
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


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


All times are GMT -7. The time now is 07:28 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0