Announcement

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

    Fetchdata dynamically for databound combo box

    Hi,
    I created a databound combo box and attached to listgrid filed. How can I dunamically refresh the combo box data? My code for creating combo box is below

    public class TestSuggestionBox extends ComboBoxItem {

    public TestSuggestionBox () {
    setType("comboBox");
    final DataSource testDS = TestGwtRpcDataSource.getInstance();
    setAutoFetchData(true);
    final Criteria criteria = null;
    ataPartDS.fetchData(criteria);
    setOptionDataSource(testDS );
    setValueField("partDesc");
    setDisplayField("partDesc");
    setShowPickerIcon(false);
    setTextMatchStyle(TextMatchStyle.SUBSTRING);
    setTextBoxStyle("gwt-SuggestBox");
    setTitle("Part Description suggestion");
    setPickListHeight(200);


    }

    }

    TestSuggestionBox testSuggestionBox = new TestSuggestionBox ();

    Criteria criteria = new Criteria();

    testSuggestionBox .getOptionDataSource().fetchData(criteria);



    final ListGridField partDesc = new ListGridField("partDesc");
    partDesc.setEditorType(testSuggestionBox );
    partDesc.setCanEdit(true);


    How can I refresh combobox dynamically? I tried so many options, but unable to find the solution.

    Thanks in advance for any help.
Working...
X