Usering
Usering

Reputation: 143

PowerBuilder dropdowndatawindow insertrow changes Display Column value

Working with PowerBuilder 11.5.

I have a datawindow (dw) consuming a dropdowndatawindow (dddw). I am performing dddw.insertrow (0) in the constructor of the dw, and then doing dw.insertrow().

The issue I am having is that the value of "Display Column" for the dddw control in the dw is being changed to the value of the "Data Column" at some point, i.e. the resulting application is showing the data (primary key) instead of a formatted string value (the "Display Column" I had selected).

I am also retrieving the value of the "Display Column" property after the insertrow and retrieve calls, and it is still defined as I had set it initially (i.e. unchanged), however when the data is displayed, the "Data Column" values are shown.

Any pointers to why this is happening?

Thanks

Upvotes: 1

Views: 2051

Answers (1)

Maximus
Maximus

Reputation: 10845

PB shows "Data" instead of "Display" when it can't find exact match of DW's value to DDDW's data.

Thought, your "Data column" has "char(...)" type?

One of possible solution - switch to numeric (I prefere "long") type instead of strings as "Data". PB much more precise with numbers.

Upvotes: 1

Related Questions