on 08-19-2014 11:39 PM
Hi All,
I have a little unusual requirement. Usually when we implement a filter for the table it shows up on the top as an input field. User can enter the filter string and the filtered data shows up in the table.
Now my requirement is to develop a filter that is similar to the one we have in Excel. Users should be able to select multiple filter string and the result should be based on those filter string. For ex. in a column if there are 3 types of values - High, Medium and Low, and I want a filter, that will show only High and Low rows in the table. It would have been really easy if we had an option to place a UI (say Dropdown) as a filter. So, on the onSelect event we could open a popup windows with all the filter strings. But unfortunately its not how WDJ is designed.
As a work around I thought of placing a table with a header and one row (with filter UIs) on top of a headerless table (data table), something like a sandwich. Since they are two individual tables, if a user wants to change the column width, both the tables will be out of sync. So i dropped that idea. Popin UI i guess will also behave the same.
Please provide your inputs too. If you have any doubts regarding the requirements please let me know.
Regards,
Piyush.
My suggestion will be to create one button on toolbar of table , say named as Filter
Open popup on click of it .. get filter values and on submit fire filter code.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Amey,
Thanks for the help. I was able to convert the InputField as a Combo box using below code.
IProposalList proposalsCity = wdContext.nodeMyNode().getNodeInfo().getAttribute(IPrivateMyView.IMyNodeElement.CITY).getModifiableSimpleType().getSVServices().getProposals();
proposalsCity.add("New York");
proposalsCity.add("Rio");
proposalsCity.add("Paris");
proposalsCity.add("x");
So when a user selects/types 'X' and press enter, a popup window will show up with all the filter values.
Now I want to know which column triggered the filter event. I am sure
table.mappingOfOnFilter().addSourceMapping(); can do the trick. But I am trying to figure out how it works.
Please provide your inputs.
Regards,
Piyush.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.