I just started using the NxGrid control and there's something fundamental I'm not understanding.
I have a NxGrid with two columns: a NxComboBoxColumn and a NxListColumn. I need each row that I add to have a ComboBox with different entries that aren't fixed (they come from some StringList variables).
For example I want the ComboBoxColumn for row(0) to contain "Fred", "Tom", and "Bob", and row(1) to contain "Mary", "Sally" "Jill" and "Susie".
Right now I have something like
NextGrid1.AddRow; // Add single row
NextGrid1.SelectLastRow();
// add the strings from this row's stringlist to the combobox for this row
for Index := 0 to MyStringList.Count - 1 do
begin
with NextGrid1.Columns[1] as TNxComboBoxColumn do
begin
Items.Add(MyStringList.Strings[Index]);
end;
end;
where I change the contents of MyStringList each time before adding the next row.
When I do that, the combo box in each row ends up containing the same data... whatever stringlist I add last.