Use DOJO to display Table Data and Filter Features

How to use Dojo to display tabular data and apply the filter function?

The steps are as follows:

1. Insert the number array into the variable data defined by ItemFileWriteStore,

2. Create an ItemFileWriteStore type data based on the data variable store,

3. Bind the data store to the grid object,

4. Define the click event in the grid, and trigger the filtering function of the grid when clicked.

Specific executable code:

      
Filter All

Update 1:

In the above example, the key of the filter and the key of grid.store, and the same name as grid.structure.

After testing, it is found that, in fact, the key in the filter should be the key in grid.store, not the field in grid.structure.

The runnable code of the key of grid.store and the field of grid.structure has been modified:

      
Filter All

The modified effect is as follows:

The ccc data does not appear, but the filter effect And existence. It can be seen that grid.filter() actually filters based on the key in grid.store, regardless of whether the key is displayed. The grid.structure part determines whether this key is displayed.

Before screening:

-------------------------- -----------------------------------------------

After screening:

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5798 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.