3.0.5

Filter the input for the grid

Hey everybody,

Just wondering, is it possible to exclude lines from being displayed in the grid? For Example, I would like to filter the grid content according to a specific value in a column. In my source file, I have the following structure:

=================================
APPLICATION ENVIRONMENT VERSION

life staging v1_05
iard staging v2_0_09
oltb prd v1_0_02
life prd v1_04
iard prd v2_0_04
=================================

So while loading the grid, I would already like to exclude lines with "staging" as environment in one case, and lines with "prd" environment in the other case, from being displayed (or loaded in the grid).

Is this possible and if it is, how can I implement this?

Thanks A LOT for some help,

Bart.
Anubis
March 7,
The best way to do this would be to filter it out at the database - as in inside the where clause of your select statement. It would probably be pretty slow on any sizable amount of data to send everything to the client and then perform string compares on every record.
Ryan Lauck
March 7,
Thanks for the reply Ryan, we're going to implement this as you explained.

Enjoy the day,

Bart.
March 8,
I want to do same thing but my input comes from text (.csv ) file how do I do this in that case,..
Tara
April 1,
You can display a subset of rows using value property array of row model, which contains an array of row indices. If you assign [1,2,3] array to row/values:

obj.setRowProperty("values", [1,2,3]);


- the grid will only display secord, third and forth row from your data model.

The same rule applies to columns as well.
Alex (ActiveWidgets)
April 4,
I would like to filter a csv file base on the data in the file. For example, show only records that have CompanyA. Is this possible?

Also, how would I capture the filter from a dropdown box?

Thanks.
James
October 25,

This topic is archived.

See also:


Back to support forum