Dec 29

ExtJS Treepanel with MySQL data

In this tutorial I’ll show you how to build an ExtJS treepanel using data coming from MySQL, while using PHP to create the json array sent to the treepanel. Here’s how:

Continue reading

May 19

Change ExtJs EditorGridPanel row color after edit

By adding an afteredit listener to your editor grid you’ll be able to change the row color on the fly, right after
the cell has been changed so users will be able to tell which records have been changed. I’ve added this instead of the little red tickbox since it is easier for the user to see and it just looks better.
Just in case this would conflict with the little red icon, I also went ahead and removed it with my custom.css file (shown below).

Continue reading

May 17

Open iReport jrxml from ExtJs as pdf

In this post I’ll show you how to create a report using iReport, uploading to your jasperserver running on tomcat and accessing the report from an ExtJS grid. In addition to Apache, MySql and ExtJS libraries (I’m assuming you already have those installed) you will need to get the following installed:

1. iReport (on your laptop/workstation)
2. tomcat (on your server)
3. jasperserver (on your server)

Continue reading

Apr 11

Extjs Cascading (Dependent) Combo Boxes

This tutorial was written after one of my readers requested help with creating a dependent dropdown menu for continents, countries and states. I hope this helps everyone out there, who like myself, have struggled with this in the past.

First you’ll need to create the connect.php file, explained here.

Next create the 3 mysql/php/json files used for:
1. gathering data from mysql,
2. storing the data into a json array for each of the combo boxes you’ll be using (Continent, Country and State).

(Please adjust the paths to connect.php (mentioned above) and all other files used in this example
accordingly and create the required tables in mysql as needed)

Start by creating the continentQ.php file, to gather the continent data:
Continue reading

Feb 12

Create Extjs PDF Report

I have been looking for ways to export MySQL data to pdf using ExtJS, and up to this day I haven’t been able to
find a simple solution. I finally came across a project called “PHPJasperXML”, which allows me to access MySQL data, export it to pdf from my ExtJS application, using php and without having to use any javascript.
Albeit, the report isn’t necessarily created by ExtJS, it is extremely easy to create the report and implement this on your ExtJS application.

**** Update May 17th 2011 ****
This is an alternate solution to PHPJasperXML, it uses jasperserver to store the report which can be accessed via its url and you can also use subreports and multiple parameters.

*****************************

Continue reading