Announcement

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

    Setting Text with setFilterEditorCriteria?

    I am trying to set the prompt text "Find field:" in a filter editor in a listGrid using the following code, but I don't see any text show up in the filter editor that is displayed. I have not yet connected the grid to any data, but I assumed that that was not necessary to see the filter text:

    Code:
            final ListGrid listGrid = new ListGrid();
            listGrid.setWidth(200);
            listGrid.setHeight(150);
            listGrid.setAlternateRecordStyles(true);
            listGrid.setShowFilterEditor(true);
            listGrid.setFilterOnKeypress(true);
            listGrid.setAlign(Alignment.CENTER);
            listGrid.setShowAllRecords(true);
            listGrid.setCanEdit(false);
            ListGridField listGridField = new ListGridField("myField", "Select field:", 180);
            listGridField.setAlign(Alignment.CENTER);
            listGridField.setType(ListGridFieldType.TEXT);
            listGrid.setFields(new ListGridField[] {listGridField});
    //        listGrid.setData(someData.getRecords());
            listGrid.setFilterEditorCriteria(new Criteria("myField","Find field:"));
    		...
    Any idea what I'm doing wrong?
    Last edited by gsl1; 24 Nov 2010, 18:43. Reason: Clarify subject.
Working...
X