Mombu the Programming Forum sponsored links

Go Back   Mombu the Programming Forum > Programming > DataGrid Component - row and column colors
User Name
Password
REGISTER NOW! Mark Forums Read

sponsored links


Reply
 
1 23rd February 21:05
darren gates
External User
 
Posts: 1
Default DataGrid Component - row and column colors



Hello,

This question deals with the DataGrid UI Component that comes with the
Developer's Resource Kit.

What I need to do is display alternating color rows in a DataGrid, while
keeping specific columns all a single color. I'm using the
DataGridObject.alternateRowColors method to color the rows, and
DataGridColumnObject.setStyleProperty( "background", theColor ) to change
the column color.

Here are a couple of files that you can look at or download to see what I've
got so far...

http://www.tufat.com/DataGridTest.html
http://www.tufat.com/DataGridTest.fla
http://www.tufat.com/DataGrid.pdf (do***entation for the DataGrid component)

As you can see, the red column gets overlaid by the alternating colors. What
I would like to have happen is for the red to be on *top* of the alternating
row colors.

Here's the exact code that is attached to the DataGrid object:

onClipEvent( load )
{
this.setColumns( "first", "second", "third", "fourth", "fifth" );
this.setEditable( true );

var dataArray = new Array();

dataArray[0] = { first:"Bill", second:"Jones", third:"123 St.",
fourth:"City A", fifth:"43212" };
dataArray[1] = { first:"Ted", second:"Smith", third:"456 Ave.",
fourth:"City B", fifth:"23454" };
dataArray[2] = { first:"Joe", second:"Test", third:"789 St.",
fourth:"City C", fifth:"99898" };
dataArray[3] = { first:"Dave", second:"Gates", third:"876 St.",
fourth:"City D", fifth:"76543" };
dataArray[4] = { first:"Betty", second:"Moore", third:"112 Blvd.",
fourth:"City E", fifth:"98765" };
dataArray[5] = { first:"Sam", second:"Johnson", third:"984 St.",
fourth:"City F", fifth:"77676" };

this.setDataProvider( dataArray );

this.alternateRowColors( "0x99FF99", "0x9999FF" );

this.getColumnAt(0).setStyleProperty( "background", "0xFF0000" );
}
  Reply With Quote


  sponsored links


Reply


Thread Tools
Display Modes




Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666