Hi Isomorphic.
I have a custom class that extends ListGrid and in this class I iterate through all the ListGridFields setting some special configurations and customizations. One of those customizations is to add a MiniDateRangeItem filter editor to all my Date and DateTime fields, in order to be able to use the advanced filtering options this control provides.
For this, I tried using the following code:
But it didn't work for my DateTime fields. On the other hand, using a Custom Data Binding (see code below), I got it to work for both fields types. So my question is if this is the correct approach to handle this case?
Thanks
ps. if instead of being lack of knowledge on my part, this turns out to be a bug, I can provide a test case for you to reproduce it.
SmartGWT 6.0p 2016-05-31
I have a custom class that extends ListGrid and in this class I iterate through all the ListGridFields setting some special configurations and customizations. One of those customizations is to add a MiniDateRangeItem filter editor to all my Date and DateTime fields, in order to be able to use the advanced filtering options this control provides.
For this, I tried using the following code:
Code:
private void addMiniDateRangeItems(ListGridField field) { ListGridFieldType fieldType = field.getType(); if((fieldType == ListGridFieldType.DATE) || (fieldType == ListGridFieldType.DATETIME)){ MiniDateRangeItem dateRange = new MiniDateRangeItem(); field.setFilterEditorProperties(dateRange); } }
Code:
private void addMiniDateRangeItems(ListGridField field) { ListGridFieldType fieldType = field.getType(); if((fieldType == ListGridFieldType.DATE) || (fieldType == ListGridFieldType.DATETIME)){ ListGridField dateField = new ListGridField(field.getName()); MiniDateRangeItem dateRange = new MiniDateRangeItem(); dateField.setFilterEditorProperties(dateRange); grid.setFields(dateField); } }
ps. if instead of being lack of knowledge on my part, this turns out to be a bug, I can provide a test case for you to reproduce it.
SmartGWT 6.0p 2016-05-31
Comment