-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi Friends.
Is ZK provides auto filter functionality with Grid or some other inbuilt table kind of component [i.e. listbox etc].
What I am looking is, if Grid has large number of rows and if we want to see only particular value rows then there should be some drop down box with list of unique column entries [For example if we have column by the name COUNTRIES, it may have thousands of rows but with limited number of countries like USA, CANADA, CHINA, INDIA, MEXICO etc. If we have select box with above 5 countries values, then once we select any country, then gird rows should be filtered i.e. Grid should display only rows that has selected country value]
We can get similar kind of functionality by means of GROUP in column default menu popup [after setting it AUTO]. But in this it will group all the rows and display all the rows with group subtitle, But I am looking only the rows selected by user but not all.
Please help me on this
Do this:
1) Fill the combo box with the countries
2) Add a button to "filter" the detail grid/ListBox
3) In the OnClick of the button "filter" do the SQL filter taking the selected value from the combo box
4) Fill the grid/ListBox with the found values
Hi yamilBracho
thanks for quick reply
I had given countries just as an example to inform the forum what I am looking for.
Actually we have a ZK web application where reports will be generated on fly by reading definition from data base. I mean all definitions are dynamic.
If I follow the approach suggested by you, I believe it will work only specified column and I need to code all logic.
But I want to use ZK in-built features if it has any.
You can find the same functionality in microsoft excel sheet.
Open any excel sheet which has few rows and few columns and select any cell, then
go to Menu ->Data->Filter->Auto Filter
Then you will see column headers appeared with small DOWN ARROW marks. If we click it we will get list of unique column entries and SHOW ALL option. If we select an element from this list box , then excel will display only those rows, but not all
In other way you can check the web app developed by using java script given below
http://www.javascriptkit.com/script/script2/tablefilter.shtml
I am looking same functionality as of above from ZK inbuilt features.
By "inbuilt" you mena databinding ?
If so, you only need to manipulate the model of your grid/listbox
Asked: 2009-11-19 12:31:37 +0800
Seen: 553 times
Last updated: Nov 19 '09