SqlDataSource filter on conditional dropdownlist values - filtering

i have 3 dropdownlists that i need to filter my datasource at runtime.
Each of the dropdownlists must be combined with the other two BUT they also have a 'special' value of "ALL". in this case i want to disable filtering on the specific filed and show all values.
Does this come with some out of the box functionality from asp.net or i have to build the string every time ?

After searching in many places i finally found out that there is NOT an out of the box functionality of asp.net to dynamically build WHERE clauses based on the values of every control that i want to participate in filtering.
I ended up with custom coding on the gridview selectedindexchanged event that builds the selectcommand text and binds the gridview again.
works fine!

Related

Is it possible to modify parts of the form based on one of the field of the form?

I am using the Formula package from the Iliad web framework in Pharo. I have a model object which have a first attribute and then one to three other attributes depending of the value of the first one.
I built a form with ILFormula but couldn't find methods in Formula to change the displayed input based on changed value on the first field.
So I believe I need to add an event on the first field and do it directly but I am not sure where to begin to that within the Iliad framework.

Customizing the Content Report Table Macro

I have been using the content report table macro, which has been working. Ideally, I only want to list content matching certain labels, and lock in an alphabetical sort order and not show the content author.
I have not been successful in figuring out a way to do this just yet.
Is there a way to just edit the source code for that macro and create a "new one"? I'm struggling to find any useful documentation out there.
Any suggestions are appreciated!
I was also interested on doing this some days ago. Unfortunately, the Content Report Table Macro only have very limited parameters which are very strict. However, the way I succeeded to display only certain properties from the pages and present them in a tabular way (in Confluence 5.8) was with the combination of the macros Page Properties and Page Properties Report, both of them linked by a unique label. I'll break it down below.
Outcome:
1. Set up of properties you want to track
Create a page.
Add the Page Properties macro (no need to specify an ID)
Within the macro just add a table with all the properties you need to keep track of, similar to this:
Important, this is what links the two macros together: Add a label to the recently created page.
2. Display properties in main page
Add Page Properties Report macro. Specify label used across all the already created pages. Also specify the space (I just love this part). In here you also add custom fields (some fields from Content Reports are here). In Options you can specify which properties to display (columns to show), also the sorting order (in my case I'm sorting by the property ID that I added to each page).
Note: if you just want to remove the content author this can even be done easier: no need to add any property, just specify the label of your pages and add the fields you need to show and sorting order.
Hope this helps.

knockout - update UI (filter data) based on select/dropdown choice?

How can I update this UI based on the selection made in the select/dropdowns?
For example, if I select a member name from the select/dropdown, I want the table to update/filter to only show those member rows (member names are in far right column) AND their corresponding date header (the gray background).
If I select a provider name from the select/dropdown), I want the table to update/filter to only show those provider rows (provider names in left column) AND their corresponding date header (the gray background).
I'm using the KO mapping plugin. The dummy data is hard coded and would eventually be returned via ajax.
Here's a fiddle of all the code (it's all just inlined in the HTML pane). You could copy/paste this and run it locally if you wanted, as well.
http://jsfiddle.net/qBGTh/
Any help/direction is greatly appreciated!
My suggestion is to use a computed value at eob level returning the filtered array. To add this computed value during the mapping process, you must customize the eob object creation using a create callback in the mapping options parameter (see mapping doc)
Here is the updated fiddle to see it in action.
Also don't forget to add 2 more observables to capture current values for the 2 select elements. The computed value will depend on those 2 observables.
Note: the provided fiddle will not run on IE as github where is located the
mapping javascript does not return the content-type header required by IE.

Multiple values for one field

In GXT I want to create a form where a single field can have multiple values. so once one value is provided user should have option enter another value for the same field, similar to how we attach files in an e-mail.. what is the best way to do this?
One way to provide a button with plus symbol in the form. Clicking that button should add a field to the form dynamically. User can use that field to provide another value.
If you are talking about a single control, which can capture multiple values, can you try Multi-Select field like the one explained in this thread?

struts2 select tag, second select based on value of first select

I have 2 select, I want the second select list loads based on selected value of first select. In another word first select is a list of objects, those objects each has a list of another objects. so I want load second list based on selected object of first select. I know that can be done using JQuery, but can I do this without JavaScript/JQuery?
Thanks in advance.
There is a tag that does this for you http://struts.apache.org/2.x/docs/doubleselect.html
Out of the box it probably uses Dojo API or uses a server side request to generate the second list. I have not used any of the JQuery UI in Struts.
No, you can't do this without Javascript. With static HTML you can't achieve this effect; drop-down fields on HTML forms come pre-loaded with their options, and are independent of other fields on the form.