Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
60
UltraComboEditor: Displaying outdated values but not selecting them
posted

Hi,

Could you give me please any hint how outdated values could be displayed in an UltraComboEditor or UltraCombo respectively.

Here's the scenario:

First we have a catalogue table which will be the DataSource for the ValueList, let's assume it contains job descriptions and has the columns primkey, deletedate and name, e.g:

primkey | deletedate | name
1 | null | development
2 | null | support
3 | null | quality management

Second we have a table which contains the data to display, in this example we'll call it 'staff' and it has the columns primkey, fk_job_description and last_name, e.g.

1 | 3 | McOntactus
2 | 1 | Heijlsberg

The data is held by a DataSet with two DataTables which are filled by the commands
-SELECT primkey, name FROM job_descriptions WHERE deletedate IS NULL
-SELECT fk_job_description FROM staff WHERE primkey = 1
and each DataTable ist linked to a BindingSource.

The UltraComboEditor value property is bound to the fk_job_description column of the staff table via a BindingSource. The DataSource is set to the BindingSource which is linked to the job_description table and the DisplayValue is set to 'name' and the ValueMember is set to 'primkey'.

So far everything works fine and selecting a job description is great!

Then, one day, a very important person decides that quality management isn't necessary anymore and it is deleted by settng the deletedate. The corresponding record now reads
3 | 2011-11-20 | quality management
and so for our poor Mr. McOntactus the job description now reads like '3' instead of 'quality management'

I'd like to have, that the job description lookup still has the text 'quality management', but that item isn't available in the value list anymore.

In other words: the old outdated value is kept and displayed in human readable text, but selecting outdated values isn't possible any longer when the

THIA,

Roman

Parents Reply Children
No Data