Board index » jbuilder » How to refresh JdbNavComboBox?

How to refresh JdbNavComboBox?


2004-07-14 01:19:27 AM
jbuilder16
I am using a JdbNavComboBox to select a record for editing/adding/etc
QueryDataSet Records; // defined elsewhere
JdbNavComboBox jdbRecordList = new JdbNavComboBox();
jdbRecordList.setColumnName("Name");
jdbRecordList.setDataSet(Records);
jdbRecordList.setEditable(true);
// Then I foolishly go and add a record:
Records.insertRow( false );
Records.setString("Name", "Value");
// ...
Records.post();
Records.saveChanges();
// Now I want to update the JdbNavComboBox:
Records.refresh(); // shouldn't this update everything attached to it?
// but it doesn't work.
// too bad there isn't this function:
jdbRecordList.refresh();
// any suggestions?
--
regards,
Dar7yl (the 7 is silent)
 
 

Re:How to refresh JdbNavComboBox?

dar7yl wrote:
Quote
I am using a JdbNavComboBox to select a record for editing/adding/etc

QueryDataSet Records; // defined elsewhere
JdbNavComboBox jdbRecordList = new JdbNavComboBox();
jdbRecordList.setColumnName("Name");
jdbRecordList.setDataSet(Records);
jdbRecordList.setEditable(true);

// Then I foolishly go and add a record:

Records.insertRow( false );
Records.setString("Name", "Value");
// ...
Records.post();
Records.saveChanges();

// Now I want to update the JdbNavComboBox:

Records.refresh(); // shouldn't this update everything attached to it?

No, this will usually not work, until the DBControl is redrawn, or until the
controls are refreshed. Hence the reason for the DbNavigator.
If you want the new content to display before the controls are refreshed,
you will need to redraw or Update the UI.