Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Ext JS Data-driven Application Design

You're reading from   Ext JS Data-driven Application Design Learn how to build a user-friendly database in Ext JS using data from an existing database with this step-by-step tutorial. Takes you from first principles right through to implementation.

Arrow left icon
Product type Paperback
Published in Dec 2013
Publisher Packt
ISBN-13 9781782165446
Length 162 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Kazuhiro Kotsutsumi Kazuhiro Kotsutsumi
Author Profile Icon Kazuhiro Kotsutsumi
Kazuhiro Kotsutsumi
Arrow right icon
View More author details
Toc

Loading the grid and implementing toolbar buttons


Generally speaking, a grid is not a grid if it can't read data. For the time being, let's just read the data from the database and display it in the grid (source file: 05_loading_the_grid_and_implementing_toolbar_buttons/php/classes/MyAppQuotation.php).

Here we'll implement the getGrid method for MyAppQuotation.php that was returning empty data.

Note

The code for this is a little bit long, so please refer to the source file to see the code.

If we put any old data in the database it will be displayed. But, because the items we want to display have increased slightly, we need to amend the JavaScript source code. Add the two files addr and note to the Quotation model (source file: 05_loading_the_grid_and_implementing_toolbar_buttons/app/model/Quotation.js).

Now let's add the two files we added in the previous step to the columns property in MyApp.view.quotation.List (source file: 05_loading_the_grid_and_implementing_toolbar_buttons/app/view/quotation...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image