# DataGrid are making me mad!

**URL:** <https://forum.kirupa.com/t/datagrid-are-making-me-mad/174389>\
**Category:** Uncategorized\
**Created:** [January 5, 2006, 10:18am UTC](https://forum.kirupa.com/t/datagrid-are-making-me-mad/174389 "2006-01-05T10:18:35Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabriel\_vieira](https://avatars.discourse-cdn.com/v4/letter/g/91b2a8/32.png) [@gabriel\_vieira](https://forum.kirupa.com/u/gabriel_vieira)\
**Post date:** [January 5, 2006, 10:18am UTC](https://forum.kirupa.com/t/datagrid-are-making-me-mad/174389/1 "2006-01-05T10:18:35Z")

</div>

Hi there,

i working for about 2 weeks on a project that works with data, and i use datagrids to show and manipulate that data. as i need to work datagrid i see that it is a lot of things tha seems very strange.

```php
DgMc.addColumn("Peso");
DgMc.addColumn("Energia Electrica");

```

that piece of code adds 2 columns to the datagrid, notice the blank space beetwen the name of the 2 column(Energia Electrica).

Now i want do add values to that columns and i use this piece of code

```php

DP=new Array();
DgMc.dataProvider=DP
DP.addItem({Peso:"1", Energia Electrica:"1"});

```

and i didnt work!!!

so i try to figured this out and i try this code:

```php
DP=new Array();
DgMc.dataProvider=DP
DP.addItem({Peso:"1", EnergiaElectrica:"1"});

```

and it worked…

the only diference is the blankspace in the name of the column,

why i cant add values to the columns that has blank space in the name??

[[]]
