Tutorial: Select field using Ajax to reload select field

This example covers the development of a search application using the Ajax field reload.

Creating a new grid

1. Create a new grid application using the SQL Select Statement as below:

E.EmployeeID, E.LastName, E.FirstName, E.Title, E.TitleOfCourtesy, E.BirthDate, E.HireDate, 
E.Address, E.PostalCode, E.Country, E.CityID, E.RegionID, E.HomePhone, E.Extension, E.Photo, 
E.Notes, E.ReportsTo, E.PhotoPath, U.EmployeeID, U.TerritoryID
employees E INNER JOIN employeeterritories U ON E.EmployeeID = U.EmployeeID
INNER JOIN territories T ON U.TerritoryID = T.TerritoryID

2. Select the Fields Positioning option in the application menu and choose U.EmployeeID, E.LastName, E.FirstName, E.Title, E.BirthDate, E.HireDate, E.RegionID, U.TerritoryID and E.Country fields.

3. Open Grid folder and click in Grid Modules.

4. Set the Search as the initial module.

Choosing Search fields

5. Open the Search folder and click in Advanced Search >> Select Fields.

6. Choose E.RegionID and U.TerritoryID fields.

Search Fields Settings

7. Open U.TerritoryID field, in search fields.

8. Change Data Type attribute to Select.

9. Open the Search Lookup block and configure the settings according to the image below.


SELECT territoryid, territorydescription 
FROM territories 
WHERE regionid = {e.regionid} AND
territoryid IN (SELECT DISTINCT territoryid FROM employeeterritories)
ORDER BY territoryid

10. Open E.RegionID settings, modify the Data Type attribute to Select configure it as following .


SELECT regionid, regiondescription 
FROM region 
WHERE regionid IN (SELECT DISTINCT regionid FROM employees)
ORDER BY regionid

Enabling Ajax to reload the field

11. Open the Ajax Processing block and mark the option “Use AJAX to reload…”.

12. Click “Run application”

Tutorials in the same category

Filter in modal

In this example will show how to configure the filter Grid to be displayed in a modal window. ...

Special conditions for date fields

This tutorial demonstrates how to use special criteria for Date field. Creating a new grid 1. Crea...

Ligação de Captura no Filtro

In this example will show how to use a Capture link in a filter application. Creating seconda...

Search with required fields

In this example will show how to use required fields in a Search application. Creating a new ...

Comment this post