Overview
In this document, we will learn to create a “Grid Search” control under the page form. This option allow us to create a Search field inserted on a column that we can fill with information from our DB based on a linked dataset. This is another easy way to make an association between tables or stored procedures previously generated in DB to print the registers in the project’s application.
How to create a Dataset for “Grid Search” control?
“Grid Search” control has a similar process than other controls that we made in previous documents (e.g. Dynamic Grid), they have to establish a connection with tables or stored procedures based on datasets.
...
Open a new query and create a procedure with 4 columns “ID”, “Ingreso”“EntryDate”, “Nombre” and “Cargo”
...
“Name” and “Role”
Code Block | ||
---|---|---|
| ||
Create Procedure [DBO]-[Sp_Dataset1]
AS
BEGIN
SELECT ID,
FecIni AS EntryDate,
Name,
Role
FROM Test_Empleados
END |
After execution is done, turn to Wayfast and select any page from the project.
...
This is the correct way to create a dataset based on Stored Procedures in Wayfast.
How to create a “Grid Search” control in Wayfast?
Now that have all the preconditions generated, we can start the “Grid Search” control creation by selecting the control and clicking on “New” button in the same page that we worked on for Dataset.
...
Inside the grid, we have the column related to the “Grid Search” control and based on the input text, we can find results and select the option to complete the information.
Recap
We used to create “Search” fields separately as control in our pages, this new “Grid Search” control give us the possibility to create a search field inside our grid view as part of a single grid column to fill in the information for each specific row in your application.