In this example we will see how to create and use the Ajax event in the grid application that allows to traffic information without reloading the page.
![](http://scriptcase.net/scriptcase-samples/tutoriais/grid/img/grid_ajax_event.png)
Creating the Grid application
1. We will create a new Grid application based on the customers table.
![](http://scriptcase.net/scriptcase-samples/tutoriais/grid/img/newapp_grid_customers.png)
2. Visit the “AJax Events >> New Ajax Event” option in the application menu.
![](http://scriptcase.net/scriptcase-samples/tutoriais/grid/img/grid_menu_ajax_event.png)
3. We will select the “contactname” field and the “onClick” event.
![](http://scriptcase.net/scriptcase-samples/tutoriais/grid/img/grid_ajax_event_01.png)
4. In the event write the following code.
if ({creditlimit} > 4000){ sc_ajax_message({lang_msg_grid_percent_hi}, "Customer Limit", "timeout=0"); } else{ sc_ajax_message({lang_msg_grid_percent_low}, "Customer Limit", "timeout=0"); }
5. Click on the button “Run application”
![](http://scriptcase.net/scriptcase-samples/tutoriais/grid/img/run.png)
Comment this post