Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    DataSource: How to display a single value via a ForeignKey?

    Is there a simple way to display a single related value via a foreign-key relationship that does not fill in a SelectItem/ComboBox?

    Normally for a ListGrid we would use something like this:
    Code:
     ListGridField customerIdField = new ListGridField("customerId");
     customerIdField.setOptionDataSource(CustomerDataSource.getInstance());
     customerIdField.setValueField("id");
     customerIdField.setDisplayField("name");
    But this creates a SelectItem/ComboBox that could potentially have thousands of entries in it.

    How can I ask for just the matched value in a TEXT field without attempting to retrieve the entire CUSTOMER table?

    #2
    Maybe this helps:
    http://forums.smartclient.com/showthread.php?t=10591

    Comment

    Working...
    X