A. Nurul Istiqamah
A. Nurul Istiqamah

Reputation: 163

Why my column not show anything when I add dx-lookup

Why my column not show anything when I add dxo-lookup

<dxi-column dataField="jenis" caption="Jenis">
    <dxo-lookup [dataSource]="types" displayExpr="Name" valueExpr="ID"></dxo-lookup>
</dxi-column>

I will custom the column content and this is my typescript

if (objectData['harga'] >= 0) {
    objectData['jenis'] = "Pemasukan";
} else {
    objectData['jenis'] = "Pengeluaran";
}

When I delete dxo-lookup, table is filled. But I need dxo-lookup to make SelectBox in data grid form. Literally all i ask is how to fill the column with custom content and but still use select box in form

Upvotes: 1

Views: 2060

Answers (1)

A. Nurul Istiqamah
A. Nurul Istiqamah

Reputation: 163

I was typo. "Pengeluaran" should be "pengeluaran" and "Pemasukan" should be "pemasukan"

let types: Type[] = [
  {
    "ID": "pemasukan",
    "Name": "Pemasukan"
  }, {
    "ID": "pengeluaran",
    "Name": "Pengeluaran"
  }
]

Upvotes: 1

Related Questions