Send Extra Parameters to ExtJS store
by Prabhat Rai

Posted on April 01, 2015 at 06:58 PM


Sometimes in ExtJS we have a requirements to send some extra parameters to the grid’s store on the fly.

Lets say we have a grid having store “DummyStore”, and a combo-box of users and we want to send the selected user id as a parameter to the grid’s store on select event of the drop down.


To achieve this in select event of combo-box the load event of the store can be written as:


Ext.getStore('DummyStore').load({
    callback : function(records, operation, success) {
        // Callback code
    },
    params : {
        'user_id' : Ext.getCmp('user_combobox').getValue()
    }
});

You can see that Request query string parameter has a field called user_id with the selected value of combo-box.


Simple isn’t it. 🙂 Happy Coding.



Share this

Search

  Recent Tips

See All »

  Recent Posts

  • Creating Installer for Laravel Project

    When you are working on a laravel project there is some basic setup that needs to be done for each install of the project. Like Permissions for ...

  • Laravel Queues With Supervisor

    In this blog, we are going to take a look into Laravel Queues. Queues allow you to defer the processing of a time-consuming task, such as sending a...

  • Partials & Utils in Handlebars

    PARTIALS Let’s say we have a structure like the following : data = { students : [{ name : ‘ABC’, roll : 1 }, { name : ‘DEF&...

See All »

  Recent Seminars

  • PHP 8 - Features

    PHP 8 has been officially released in November 2020! This new major update brings many optimizations and powerful features to the language. This...

  • ProxySQL

    ProxySQL is a high-performance SQL proxy. ProxySQL runs as a daemon watched by a monitoring process. The process monitors the daemon and restarts i...

  • Unix Commands & Shell Scripts to help save our time

    Time is important. We should not waste it doing trivial things. Automate things wherever possible.

See All »