I am a new user of Extjs library, I created a grid successfully and it works just fine, now I want to use Ext.grid.GridFilters to add filtering to my grid, however I don't see this class in the Extjs source code files, where I can get the required files?
The community-supported plugin for grid filtering is found in this forum thread.
Filtering is a custom thing you have to implement by yourself. There are a few community add-ons which make it easy, but start by looking at the actual grid STORE instead of the grid panel. The store contains the data and supports filtering. Once the data is filtered, the store will raise it's data changed event and as long as the grid is wired accordingly you will see the filtered recordset in the grid. For more info I'd check out their example pages and read the source there.
As mentioned above: use the filter method in the store.
There is a tutorial covering the subject at http://aboutfrontend.com/2011/01/extjs-grid-filter/
There is proper filter option is provided by ExtJs:
store.filterBy(function(rec, id)) { return (rec.get("RecName") =="FilterRecord");}
After filtering data, filter will always present in stores Filters config. So if we want to remove filters and show all records then just clear applied filters like this:
store.clearFilter();
Related
I have a lists containing 20k items.I want it to display it in a page and that page also contains filters just like in ecommerce site.I tried to retrieve the whole items at the beginning using rest api and stored it in a json and then filter was appiled to that json.I displayed that JSON using jquery datatable and based on filter box check I redrew the datatable.But this approach is not good as it is taking a huge page load time for me. Please suggest me another solution for this.
I was able to handle 20k items using pagination,that is on each page showed only 30 items.
I was able to implement custom pagination using knockout.js
I referred this url : http://www.sharepointyammertech.com/2014/11/sharepoint-2013-how-to-implement.html
Then I created filter and was able to repopulate the the table
I have a page where a user can sort some items by some different filters.
In the Newest filter, the items will just be listed with a name. However, in the By collection filter, items in a certain collection will be underneath the title of the collection.
So, this is two different ways to display the items. I am already handling routes using my backend framework.
How can I accomplish this?
Ok. I'm assuming that the data you are receiving has all these attributes:
DATE
COLLECTION NAME
Nr.of LIKES
ALL
First read this, it's a short documentation on filters Take a look at this http://docs.angularjs.org/api/ng.filter:filter.
You can make 4 buttons with different orderBy methods.
Here's a JsFiddle http://jsfiddle.net/z6bQN/
You get all the data out then within each tab you manipulate it using orderBy
Here is also a working plnkr with the buttons http://plnkr.co/edit/fMrhagVKl2nehzTOHriF
Enjoy.
I am looking for a grid implementation on my dashboard. The requirement here is that if the data that the grid might be fetching changes while a user is looking through the grid, the changes should be reflected. So the row present in page 1 may be present in page 2 after sometime. If the user clicks on page 2, he should be shown a fresh page that is fetched from database and that item should be in page 2. So, I need to use a pagedObjectList to get the data and show that data when user looks for the next page. The same requirement is for sorting too.
So I am looking for a javascript Grid like jqGrid or DHTMLX grid or a Tag Library which has some sort of ajax calling mechanism for sorting and paging instead of showing the old data which is fetched first.
Please suggest any grid/ tag library implementation which can fulfill the above mentioned requirement. Thanks in advance
I finally went with DHTMLXGrid, it has all the configurable actions I needed, like onPageAction, onSort etc. I could simple write my custom code for those trigger events. I would also recommend it to others, pretty handy and solid.
I am looking for a jQuery grid that will allow me to edit data and save it so it will be available for viewing every time I open the document with the data.
Any recommendations? The simpler the better. I am just trying to create a new document with a grid to replace an old Google Spreadsheet that I currently use.
Are you Looking for slickgrid?
And its not possible to see eachtime time without persisting the data.
And DataGrid is here with Basic CRUD operations.
We're using SmartClient GWT library (see the Smartclient GWT showcase here).
I'm trying to make a ListGrid UI that when you click a record the fields become editable. Just like the example:
Grid Editing Mass Update
The difference is I'm using my own custom GWT RPC services and manually adding ListGridRecord's to my own DataSource, and I see my records appear but the fields aren't editable when clicked. I've created a custom DataSource using the GWTRPCDataSource implementation and properly override the executeFetch method.
Is there some special processing that's going on using the examples XML DataSource that creates ListGridRecords that properly set it up to be editable?
For example I'm using the CountryXMLDS.java just like the example except I'm adding one custom record (and I've removed all fields but the population field that I want to be editable). I see my record appear but the field is NOT editable when the record is clicked.
ListGridField populationField = new ListGridField("population", "population");
populationField.setType(ListGridFieldType.INTEGER);
populationField.setCanEdit(true);
countryGrid.setFields( populationField);
countryGrid.setCanEdit(true);
countryGrid.setEditEvent(ListGridEditEvent.CLICK);
ListGridRecord record = new ListGridRecord();
record.setAttribute("population", "5");
CountryXmlDS.getInstance().addData(record);
Whatever the problem is, it's not in the details you've shared. Try these steps:
make sure you're calling setDataSource() on the ListGrid with your DataSource
make sure the name of your ListGrid field matches a field from the DataSource. This is case sensitive
make sure you have a primaryKey declared in the DataSource. There's no way to save edits unless there's a way to identify records
look for messages in the Developer Console
http://forums.smartclient.com/showthread.php?t=8159#aConsole
shotgun approach: override ListGrid.canEditCell() and return whatever you want - this overrides all the declarative settings like field.canEdit.