PDA

View Full Version : Spaces in my data!


FlashDesign
07-02-2004, 04:17 PM
Hey everyone,

There must be a way to put a space in the column name for a DataGrid, but I can't figure out how. For example, I want one column to say "Added By", but I temporarily have it as "AddedBy" because I dunno how else to do it. :( Here's an example of my code:

transactionsDP = new Array({AddedBy:"sts", AddedDate:"01/01/04"});
dgTransactions.dataProvider = transactionsDP;

Thanks so much!

freddycodes
07-02-2004, 04:50 PM
Not in the context you want to do it.

AddedBy is a property name and by default the column name comes from the property name. Properties of objects cannot have spaces in their names.


You will need to get a reference to the column you want to change and use setHeader()

like

dgTransactions.getColumnAt(0).setHeader("Added By");

FlashDesign
07-02-2004, 09:16 PM
ooohhh ok I see. Thanks so much! It worked perfectly :D