Value of a Column Filter

Posted by MGreenwood on 17-Oct-2011 05:27

Hi,

Can anyone tell me how I can get the value of an ultragrid column filter.

We have two grid on a screen, One grid has a single column enabled to allow filtering.

On changing the filter of the first grid I want to use the value selected by the user to modify the query for the second grid i.e.

Grid 1 has a Grade column, if the user selects Grade "F" I want the second grid to only show items relevant to Grade "F".

As yet al I have been able to retrieve from the grid has been the "Infragistics.Win.UltraWinGrid.FilterConditionsCollection".

Thanks

All Replies

Posted by MGreenwood on 17-Oct-2011 09:01

So the clue was in the fact that I had a FilterConditionsCollection

/* Define a variable to represent the ColumnFiltersCollection */

DEFINE VARIABLE lvoColumnFilters AS Infragistics.Win.UltraWinGrid.ColumnFiltersCollection NO-UNDO.

/*Assign the column filter the value of the Column Filters*/

lvoColumnFilters = uGrid:DisplayLayout:Bands[0]:ColumnFilters.

/*Retrieve the filter value */

lvcFilterValue = lvoColumnFilters["ColumnName"]:ToString().

lvcFilterValue can contain a single value "= F"

or it can contain complex values i.e. choose blanks from the Filter drop down and it returns = "= '(DBNull)' OR ='(DBNull)' OR =''  ". Choose (Custom) from the drop down and selecte Greater than or Equal to F and Less than or Equal to J and it returns  ">= 'F' OR

This thread is closed