Which gridview is performing the search? - yii2

I have two gridviews on one page that use the same search model, how can I tell which gridview is the one submitting a search in the backend?

One way to do this is to give the gridviews different filter urls (https://www.yiiframework.com/doc/api/2.0/yii-grid-gridview#$filterUrl-detail) each with different parameters.

Related

Dynamic Set of Fields in Access

I have tried several different ways of searching for this information with no luck so far...
Firstly, I am using Access 2013, and I wouldn't exactly call myself experienced with it...
I have a table with many fields and I want to be able to create a report dynamically that only uses a subset of those fields. The subset is to be determined by a ListBox (with multi select turned on) containing the list of all of the fields.
So, a user will:
Opens the filtering form that was created
Selects the fields they wish to view
Clicks "Generate Report"
The report will only shown the fields that were asked for
Is this possible? If so, how?

Create gridview that adds in data (number of records) dynamically

I need something to hold the search results and I'm thinking of using gridview (or maybe a table). When user performed a search, search results will be shown in a table format. Something like:
The column attributes are fixed. But the number of records returned may be different and the gridview (or table) must be expanded accordingly. The max records at one page will be 10 and I need to do Paging at the bottom as well.
In this gridview (or table), user can click on the ID to select the result for other purposes. I have to cater that requirement too.
I'm using MVC with html and css. Please help! I am really new to this!
You may take a look at the WebGrid helper: http://msdn.microsoft.com/en-us/magazine/hh288075.aspx

Sync two input fields in 2 different jsps

If I have 2 input fields in a jsp and i want them to be in sync always, I know the solution. Write an onchange event for each input field and call a function. This function will sync the two fields.
Now in my situation, the two input fields are in two different jsps. And they are both included in a third jsp. Is it still possible to sync the fields?
If both jsps result in a single html page, on client side you are still dealing with a single page. Approach described in question should work there.
Set an attribute in session, and use this value where ever you want using ,
session.setAttribute("userName",userName);
session.getAttribute("userName");

Multiple radio buttons naming problem

i have a bit of logical problem here. I have a catalog of products that have unique ids and options that are displayed to the user through radio buttons. Now my problem is that a user must be able to select different options (from different products) and to submit them to a PHP script that handles this request (via POST). The problem is that the listed products are in one form, and to be able select multiple radio buttons i have to make them with unique names (and to handle the posted choices i have to guess the name of the button). Is there a way to make all the selected choices into array or something, cause otherwise i have to guess the POST-ed field every-time. I need to just pass the id and the options related to him, so i can extract the information from DB.
And one more what is the most convinient way to store selected choices through multiple pages (a.k.a paging - loaded through ajax) - cookies or temp variable.
Sounds like you should be using Checkboxes rather than Radio buttons - if you want multiple selection
I agree with barrylloid.
then, if you name all your checkboxes something like
product1_select[]
then you should be able to read the values of the selected boxes in the PHP backend using
$_POST['product1_select']
Good luck!

How to build the search form in ms-access

I have a ms-access database, now I need to build a search form on table "Samples" .
Now, the difficulties are I need 4 search criteria, SampleNo, SampleDate,SampleClient,SampleBatchNo.
The search criterias can work together or not.
I have a listbox to show the search results, and I want to be able to select more than one records in the results set and open a new form with the limitation of the selected records only.
Thanks
Shuolinq,
I answered a similar question yesterday here...
Populate list box from a table in vba
The only difference between that question and this one is that your rowsource will have multiple of those "Like" lines, one for each of your possible search terms and each pointing to a different control.
As for the second part of your question...opening a form using the selected results...that is a lot tougher. It can be done but only with VBA code.
Seth