Jump to content


juppstrunk

Member Since 11 Apr 2014
Offline Last Active Sep 29 2014 04:47 PM
-----

Topics I've Started

How to get selected object from combobox column

11 April 2014 - 12:33 PM

Hello,

I want to use a NextGrid with two columns, the first being a simple NxTextColumn, the second a NxComboBoxColumn.
The comboboxes shall contain (along with the label) objects, just like you can do with standard comboboxes.
Each row shall have an identical combox.

So I initalize it like this:
TNxComboBoxColumn(myGrid.Columns[1]).Items.AddObject(someLabel, someObject)

I expected that I can then get the selected object for each row, but I can't figure out how.

I tried with
myGrid.Cell[1, row].ObjectReference
but this always returns nil.

I tried to use the ItemIndex
TNxComboBox(myGrid.Cell[1, row]).ItemIndex
but this returns weird numbers.

So I am apparently doing something wrong. Can you give me any hints?

Thanks,
JS