I am using smartgwt power 2.5 nightly and running gwt 2.3. I am trying to individually get the criteria for a listgridfield, is this possible? The listgrid has several columns and some of the fields have option datasources for their value maps. I tried getting the value selected using the select item, but that didn't work since I used setFilterEditorProperties. Would I have to add a clickhandler to the selectitem to get the values selected? I didn't know if this was the only way to get the values selected on demand.
Announcement
Collapse
No announcement yet.
X
-
We don't entirely follow your requirement here, but it sounds like you want to look at the selected value of a filter-editor field when the user updates it, before the filter occurs on the grid.
Is that right?
If so you could use listGridField.filterEditorProperties to apply a 'changed' handler to the automatically generated form item that shows up in the filterEditor for the field.
-
Originally posted by IsomorphicWe don't entirely follow your requirement here, but it sounds like you want to look at the selected value of a filter-editor field when the user updates it, before the filter occurs on the grid.
Is that right?
If so you could use listGridField.filterEditorProperties to apply a 'changed' handler to the automatically generated form item that shows up in the filterEditor for the field.
Comment
-
Sure that makes sense.
If you wanted to get the actual criteria entered by the user, you could use getFilterEditorCriteria().
However we understand that's not exactly what you're looking for.
We don't currently have a supported API to reach into the filterEditor and retrieve per-field values from the editor. We'll look into adding such an API.
However - you can achieve this for now via the following:
Code:myListGrid.filterEditor.getEditValue(0, <fieldName>);
As noted - this is not an officially supported API so we can't guarantee that it will not change in a future release. However it is very unlikely that this particular area will be changed in a way that would break this method call.
We've noted that this has been exposed in this forum thread and will be sure to update it if we ever make a change that would obsolete this approach (or when we add a supported equivalent).
Comment
Comment