How to customize pagination toolbar in extjs 4 - javascript

i have a dataview and i am showing some images inside it. Now i am doing pagination for the dataview. I dont need the default paging bar using extjs. What i need is a customised one. That is there will be an icon for showing previos page on the left side of dataview and an icon indicating next page on the right page in between two icons i have to show the page count like "1,2,3,4,5".
Is it possible to customize the default paging bar in this way?
{
xtype: 'pagingtoolbar',
store: store,
dock: 'bottom',
displayInfo: false,
border:0
}

Related

Moving of scroll bar up and down hide records from hierarchical records tree from UI. gwt and extjs

I am using tree in treepanel and treestore to show hierarchical records on UI for one of my application. When I add some no of records vertical scroll bar is appear. I am still adding records. When I do scroll bar up and down some records are invisible and process of hiding records is continue when I am scrolling up and down. When I do check or uncheck any one of record which is visible now, tree is refresh and I am getting all records back. Which component is responsible for this? How can I solve this problem ?
I was having the same issue with a grid and solved it by declaring:
bufferedRenderer: false
I.e.:
Ext.define('YourTree', {
extend: 'Ext.tree.Panel',
store: store,
//other properties
bufferedRenderer: false
});

How to stop overlapping ExtJS TreeList items?

I'm using border layout panel with TreeList component and panels on the center, but when I add panel to center card panel, TreeList items are overlapped by panel headers.
How to fix it?
Steps to reproduce: click Home menu item
ExtJS 6.0.0.640, Triton theme
Demo is here:
https://fiddle.sencha.com/#view/editor&fiddle/2cs7
Set the z-index of the center region to a value less than the menu's. In your fiddle example, this worked with value zero.
// JavaScript
{
xtype: 'panel',
region: 'center',
cls: 'panel-center'
}
// CSS
.panel-center {
z-index: 0;
}

ExtJS and buttons

I'm novice in ExtJS ... but
I can't solve my problem with two buttons, let's say [B1] and [B2].
On simple toolbar I want to have two buttons on the SAME place
respectively on something (let's say 20 pcx from the left on the
toolbar) displayed alternately [B1] or [B2] on the same position.
Buttons are defined as:
xtype: 'toolbar',
dock: 'bottom',
height: 30,
items: [
[B1] is filefield button:
xtype: 'filefield',
itemId: 'FFId',
buttonOnly: true,
...
[B2] button (in fact used as pull down menu button):
xtype: 'button',
iconAlign: 'right',
...
]
When buttons are simple buttons boyh situation is the same. I tried
to hide/show them the following way:
on the base of hidden property and method setVisible() they are no
in the same place, they are displayed "side by side" (I mean e.g.
[B1] place is empty and on the right side [B2] is displayed)
on the base of style: 'visibility: ...' - the same situation
on the base of style: 'display: ...' almost good, both buttons
are displayed the same place but (left 20 pcx the toolbar)
lower in the toolbar so I see half of both of them
Have you any suggestions?
Thanks in advance!
Try using the property hidden: true.
And for changing the state after it is rendered use the functions .hide(), .show() or if you want to use the same function for both .setHidden(boolInput) where boolInput is true if you want to hide the button, and false if you want to show it.
Edit for clarification:
I assumed you to be wanting to show only one button at a time, and have which ever button is showing at any given time be displayed in the same location. Is that what you wanted, or something different?
Here is a working example of what I understand you are looking for:
https://fiddle.sencha.com/#fiddle/nvn
For your third option style: 'display: ...', you can try set margin and padding configuration to adjust the position of buttons.

How to add a fixed positioned summary row to the grid with infinite scroll

I have a grid with infinite scrolling.Is it possible to add a summary row to the grid with fixed position i.e bottom of the grid.
Whenever the grid is scrolled to the threshold the store loads with new page data,at the same time summary data should also be refreshed.
Any ideas or suggestions?
ExtJs version : 4.1
Take a look at this: https://stackoverflow.com/a/16549178/2085604
You can use the dock config to fix your row:
features: [{
ftype: 'summary',
dock: 'bottom'
}],
I don't know if this would work with infinite scroll. You can try.
API and example here: http://docs.sencha.com/extjs/4.2.0/#!/api/Ext.grid.feature.Summary

Customizing Ext.js grid panel's title

Is there a way to customize the title of ext.js grid panel (or is there a more generic way of customizing panel title) by adding custom controls to it, and not tool buttons?
I am tring to add a search field to the title, but with current existing implementation (found in the ux/grid example) it is shown how filter can be added to the drop down menu of the grid's title, and not to the title itself, which is what I am trying to achieve..
Any clue?
Have a look at the grid panel's header config, where you can set any configuration option of Ext.panel.Header. As it is a container, you can just specify its items there:
header: {
title: 'Test',
titlePosition: 0,
items: [{
xtype: 'textfield'
}]
}
Also check out this fiddle.
Header is a container with hbox layout so you can add/remove items to it as to any other container. You can test it (for example) here: http://extjs.eu/apps/saki-writable-grid/ by typing
Ext.ComponentQuery.query('maingridview')[0].getHeader().add({xtype:'textfield'});
in the console. The textfield appears at the header right.
As to grid filtering, see Grid Search Plugin that can be added also to the grid header.

Categories

Resources