How to use single Item Values of metadatagrid

Login or register to post comments
2 replies [Last post]
Offline
Joined: 07/23/2010

Hi @ all,

I am very new to qcubed and need some help.

I`ve got a metadatagrid of a table.

No i need to fetch only the ID of each row to go on working with it.

I tried hard to find a solution but $_ITEM and $this->datagrid->DataSource didnt help me out.

Does anyone have an idea ?

I have to read out more data to each "BelegNummer" and tried it like that:

$this->dtgKundenKontos = new KundenKontoDataGrid($this);
$this->dtgKundenKontos->MetaAddColumn('BelegDatum');
$this->dtgKundenKontos->MetaAddColumn('Bemerkung');
$this->dtgKundenKontos->MetaAddColumn('BelegNummer');

$conditionsAND = QQ::Equal(QQN::KundenKonto()->BelegNummer, $_ITEM->BelegNummer);
$results = KundenKonto::QueryArray(QQ::AndCondition($conditionsAND), false);

Thanx

vakopian's picture
Offline
Joined: 04/08/2008

TEngels,

I'm not sure I fully understand your question, but have you looked at the QDataGrid examples, in particular http://examples.qcu.be/assets/_core/php/examples/datagrid/rowactions.php ? It shows ID's in the datagrid, and it shows how to add actions on rows that can get and use the ID's.

Also note, that $_ITEM is only available when setting up the data grid columns (or row actions) inside special tags. It's not available when creating the data source or its condition. $_ITEM represents one element from the datagrid's DataSource array during the rendering of the datagrid.

-Vartan

Offline
Joined: 07/23/2010

Mhh ok thanks so far...

Ill try it with the DataGrid with rowactions...

If i dont get it... wil ask again :-)