ArtSoftSolutions

ExtJS

ExtJS grids and add/remove grouping features

An article by Robert

In this article we want to describe an issue with the clearGrouping method of the GridPanels in ExtJS 3.3.1 which is not saving the grouping state in the State Provider. Considering you have a grouped stateful grid, if you attempt to clear the grouping externally (via a button, for example), the state is not updated accordingly and on the next load, the grid will still be grouped. In other words, calling groupBy() method is updating the state, while clearGrouping() method does not.

This article will show you how to save the state when externally calling the clearGrouping() method.

extjs grouping grid

 

ExtJS PagingMemoryProxy Filter

An article by Robert

The ExtJS PagingMemoryProxy extension is very good to use it when you want to load data in a component and handle it locally, using javascript. I see others using it when they have to load small amounts of data (less than 15KB), or when the data really takes a lot of resources from MySql to be assembled on each pagination and it's easier to have all the data at once and then perform different operations with it on client computer. On the other hand, the PagingMemoryProxy extensions takes quite some memory resources on the client side and since it loads all the data at once, is not recommended for large amounts of data.

 

ExtJS - problems with external filter on grids

an article by Robert

ExtJS grids offer us a wide range of native features and possibilities. Filtering by values of some columns is one of them. Although unintuitive, this method has its limitations - it applies only to the values of the store - meaning our filtering criteria has to be a column in the grid.

grid-filter

An interesting problem appears when we try to apply an external filter over the grid's store. Say we have a users grid (first name, last name, id, level and domain) and we want to apply a filter from a combo-box by the level of the employee.

Of course, we could activate native ExtJS filtering, but this example wants to be an alternative the the default ExtJS filtering.

 

Use Namespaces to organize your ExtJS code

an article by Dumitru

In today’s modern web applications it is typical to include many libraries, widgets and snippets of code from many different sources. You must be mindful that other developers may be interacting with your code simply by both sets of code being included on the same page. It is not a safe assumption that you have the entire global namespace at your disposal.

Why use namespaces?

In our example we see managed some tasks wich are differnced by received and created tasks. It is important that code in received_tasks.js and created_tasks.js can have the same objects, variables and functions identifiers – this can create some real problems in big applications.

firebug example

 
You are here: Home Tips&Tricks ExtJS