Hi everybody.
Have a look at this sample: http://www.smartclient.com/smartgwt/...tifield_search.
In SelectItem, when I filter ("pen") the results are all items containing the string "pen". On the other side, in ComboBoxItem, the filter use "starts with" to show the results.
I have to use SelectItem because of its "multiple" property.
I tried the following options but none worked:
filterListGrid.setAutoFetchTextMatchStyle(TextMatchStyle.STARTS_WITH);
productFormItem.setTextMatchStyle(TextMatchStyle.STARTS_WITH);
/*** code ****/
ListGrid filterListGrid = new ListGrid();
filterListGrid.setShowFilterEditor(true);
filterListGrid.setShowAllRecords(true);
filterListGrid.setAutoFetchTextMatchStyle(TextMatchStyle.STARTS_WITH);
ListGridField filterField = new ListGridField("filterProduct");
TextItem filterEditorFormItem = new TextItem();
filterEditorFormItem.setHint("type here to filter...");
filterEditorFormItem.setShowHintInField(true);
filterField.setFilterEditorProperties(filterEditorFormItem);
SelectItem productFormItem = new SelectItem("itemSelect", "item");
productFormItem.setOptionDataSource(dataDS);
productFormItem.setDisplayField("productName");
productFormItem.setValueField("productValue");
productFormItem.setPickListProperties(filterListGrid);
productFormItem.setPickListFields(filterField);
productFormItem.setUseClientFiltering(false);
productFormItem.setTextMatchStyle(TextMatchStyle.STARTS_WITH);
How Do I get this work?
p.s.: How great would that ComboBoxItem had the "multiple" property.
Tks.
Have a look at this sample: http://www.smartclient.com/smartgwt/...tifield_search.
In SelectItem, when I filter ("pen") the results are all items containing the string "pen". On the other side, in ComboBoxItem, the filter use "starts with" to show the results.
I have to use SelectItem because of its "multiple" property.
I tried the following options but none worked:
filterListGrid.setAutoFetchTextMatchStyle(TextMatchStyle.STARTS_WITH);
productFormItem.setTextMatchStyle(TextMatchStyle.STARTS_WITH);
/*** code ****/
ListGrid filterListGrid = new ListGrid();
filterListGrid.setShowFilterEditor(true);
filterListGrid.setShowAllRecords(true);
filterListGrid.setAutoFetchTextMatchStyle(TextMatchStyle.STARTS_WITH);
ListGridField filterField = new ListGridField("filterProduct");
TextItem filterEditorFormItem = new TextItem();
filterEditorFormItem.setHint("type here to filter...");
filterEditorFormItem.setShowHintInField(true);
filterField.setFilterEditorProperties(filterEditorFormItem);
SelectItem productFormItem = new SelectItem("itemSelect", "item");
productFormItem.setOptionDataSource(dataDS);
productFormItem.setDisplayField("productName");
productFormItem.setValueField("productValue");
productFormItem.setPickListProperties(filterListGrid);
productFormItem.setPickListFields(filterField);
productFormItem.setUseClientFiltering(false);
productFormItem.setTextMatchStyle(TextMatchStyle.STARTS_WITH);
How Do I get this work?
p.s.: How great would that ComboBoxItem had the "multiple" property.
Tks.