I am trying to change the Refresh button handler of the Extjs GridPanel top-bar paging tool.
PREFACE:
I have created two stores for a single grid panel. One remote store fetches records from the DB and then after that loads the data onto the other local store. The reason is that I want local pagination with a lot of data.
PROBLEM:
Since the local store has no proxy on clicking the reload button in the grid's top-bar paging tool nothing happens. I need to overload/change the handler of that button to call the remote store to reload.
MORE PROBLEM:
I have only the extjs grid panel object on hand. Can't change the definition/code of the Ext.create('grid-panel',{}). Only have access to the output/grid object.
the button is visible through this command but can't change any of its properties.
***.***.****.***.****.gridObject.getDockedComponent('toptoolbar').getPagingItems()[10].items
*** is the namespace of the object(cant share that)
QUESTION:
Is there any way to tackle this problem or I am doomed?
Related
I have an page item and an interactive grid on an apex page . Page item is of select list type and base on the selection the data in the grid changes. I have default Add row button in the grid to add rows . I want to refresh the grid after after click on the SAVE button in the grid. If the grid automatically refresh itself after a fixed interval of let's say 2 or 5 second that is also good for me.
For the current scenario the rows are getting added but are not reflecting on page in the interactive grid after clicking on SAVE but entries can be found in the table in the database. After reloading the page the entries are reflecting in the grid.
NOTE : I am working over a database link for fetching the data.
There is a way to hook upon the built-in save action of the interactive grid.
Steps below will create a custom event, listening to the interactivegridsave event. That event is fired by APEX after the Interactive Grid has completed its own save process. Make sure the event name is spelled correctly.
Create Dynamic Action
When → Custom
Custom Event → interactivegridsave
Selection Type → Region
Region → <your region>
Refresh action (maybe turn off Fire on Initialization)
I think this will help you.
When you add rows to your Interactive Grid and hit save button, it refreshes and you can see the IG updated.
In case you need to refresh the region or the page every 5/10 seconds, please follow these steps:
Define a Static ID for the IG, for example "IG1".
In the page attributes, navigate to Execute when Page Loads and enter:
var model = apex.region("IG1").widget().interactiveGrid("getViews").grid.model;
setInterval(function(){ model.fetchRecords(model._data); }, 10000);
This is going to refresh the IG every 10 seconds. You can set it to 2 or 5 seconds.
I had something similair with filters, If I added a row that shouldnt show up due to the filter I had on it would still be there until I refreshed. Of maybe if I changed something so it should no longer show up, it saved, but still showed up.
What I did was do a page submit after saving.
I have a Dynamic Action on Click Selection type jQuery Selector and the selector being [data-action="save"]
Then the action is simply Submit page.
This way after you click save, it submits the whole page and reloads.
Hope this does what you need.
I am using bootstrap (uib) tabs, angular 1, angular-ui-grid. Each tab contains a single grid and each tab can also have sub tabs.
I am facing sever performance issue in application.
Data nature - Tree structured which can not be paginated. And size could be in MB's.
I tried 2 approaches:
Approach 1:
I used ng-show to render grid in each tab, which keeps DOM in browser while tab switching.
It really slows down the application when there are multiple tabs open.
Approach 2:
If I use ng-if to render grid in each tab, which removes DOM while tab switching, takes much time in tab switching.
Because it has to rerender whole grid again. And after that I need to apply state changes again on that grid to restore
previous state.
I think you can continue to do with approach 2, but follow these steps:
Init all grids without data
Just load data for first grid, bind data to it.
Load data for others grids. Keep them in some variables.
When user click on other tabs, bind related data.
If you want real-time data when click on other tags, forget step no.3, when user click on other grids, make an ajax call to get data and bind them to grid.
I am new to Meteor framework.
I am having a doubt, can anyone clear me..
I have scrolling events from bottom to up. Whenever i click an event that is being scrolled, i want to open in a new tab. Every event is having a specific href.
How to do this application using the database.
I want to store all the events in database and parllely i want to add new events directly from website and store them in database and fetch the event to the scrolling area.
Meteor is a good choice for this. Have you decided how to do the UI? Will you use bootstrap or material design. Do you have a scroller in mind?
You can set up your server process to make http requests to fetch data from another web site (using RESTAPI?) and store them in the database. https://atmospherejs.com/percolate/synced-cron lets you schedule regular server processing runs.
Thanks to Meteor's reactivity, the UI doesn't need to concern itself with the back end, data will simply appear, and a helper task will run every time to deal with changes to the data.
Lets say I have two(or more) same panels with same store in my app and they are on the screen. I changed something in one panel and want to refresh two stores at the same time. ok I know how to access with Ext.cmp() or up() or down() function but is it possible to just load store and refresh it everywhere? or how to do this? any example...
It should happen automatically. The framework has one-way binding build into it out-of-the-box. You can test this by open a page with a grid and a loaded store. If you then go to your console and get the store and add a item, it will automatically be added to the grid or edit the record bind to the model on the store. Type in the console of your devtools of your browser something like this:
Ext.getStore('Users').add({id: 9238,firstName:'Goga',lastName:'Gubi'});
or
Ext.getStore('Users').getAt(2).set('firstName', 'Goga');
The fields and the store should correspond with your store and model off course.
As soon as your store is updated it will "rebind" the views to which the store is binded. This is why you always should use loadRecord on a form or get a reference to a store bind to a grid and use add() to add a record.
I have some strange issue with Update Panel.
I am using Devexpress Controls, JQUERY AJAX in one of my applications. I have used Server side coding + Client side coding aproach i.e. using Jquery, JS and AJAX + Update Panel on some pages where aspxgridview is there.
I am creating a scenario via example situation according to the problem I have faced:
1) There are some ASPxcomboBoxes for e.g.County, State and City.
2) On client Selected index change of Country, I have fetched the data via AJAX and bind the states in State ASPxComboBox using JSON and same for the city combo on client index change of State.
3) On the city combo's index change, I have bound a ASPxGridView with some related data and ASPxGridView and City combo is wrapped in Update Panel as we cannot bind the ASPxGridView via AJAX so to avoid postbacks I have used update panel and its working fine.
4) If user doesn't selects any record from the Grid on submit click then its prompts the user that select any one record and I have kept the validation on server side button's click event.
Now, The problem is after submiting and validation occurs. The State's combos items are repeating for e.g. initial items were : --select--, USA and after validation occurs on submit its showing --select--, USA, --select--, USA.
I have not bind the control on page load event as its binded via client side. The property of EnableSynchronisation is True to synchronise client and server items of aspxComboBox.
When I saw using debugger when I click on submit. I have quick watched State combo on page load event and its items count is 4 as 2 are repeatative items.
The problem is on even first line of page Load event when I Add Watch to it I get the items count as 4 that means items are posted wrongly to the server.
When I remove Update panel, everything works fine.
I don't know why wrong items/ repeatative items are posted on server. Please help.
Solved the Issue.
Wrapped the Update Panel to State Combo.
Actually It was not needed as State Combo need not be refreshed via Server Operations as I have used AJAX to bind it on client.
But Wrapping the Update Panel to it did solved the issue.