Angular-Slickgrid | lightning fast & customizable SlickGrid datagrid | Grid library
kandi X-RAY | Angular-Slickgrid Summary
kandi X-RAY | Angular-Slickgrid Summary
One of the best javascript datagrid SlickGrid which was originally developed by @mleibman is now available to Angular. I have used a few datagrids and SlickGrid beats most of them in terms of functionalities and performance (it can easily deal with even a million row). We will be using the 6pac/SlickGrid fork, it is the most active fork since the original author @mleibman stopped working on his original repo. Also worth knowing that I have contributed a lot to the 6pac/SlickGrid fork for the benefit of Angular-Slickgrid... also a reminder, this is a wrapper of a jQuery lib (SlickGrid) and a big portion of the lib (like Editors, Filters and others) are written in jQuery/JavaScript, so just keep that in mind and it also mean that jQuery is a dependency.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of Angular-Slickgrid
Angular-Slickgrid Key Features
Angular-Slickgrid Examples and Code Snippets
Community Discussions
Trending Discussions on Angular-Slickgrid
QUESTION
I have an issue with the Angular Slickgrid library, To modify the sorting button function I need to use the onAngularGridCreated event, (which, I assume) return the instance of my grid. But when I add the following line to my angular-slickgrid element:
...ANSWER
Answered 2022-Feb-23 at 23:05After all the comments exchanged on the question, the issue is with Angular Language Service used by the IDE (typically Visual Studio Code) and throws some errors when strictTemplates
is enabled (see Angular-Compiler-Options). Seriously I wish that they would fix this with Custom Event but as far as I know, they have not and we can only bypass the error following the steps below.
You have 3 ways of dealing with this
- disable
strictTemplates
(simplest but you won't see all other potential valid errors)
QUESTION
Want to disable the selected row items by updating the gridOptions
after some button clicks.
ANSWER
Answered 2021-Sep-07 at 20:34I'm not sure if you can toggle the checkbox column without removing it (maybe with grid.setColumns()
but it's probably better to just use the selectableOverride
callback. It will allow you to dynamically change its usability on the fly (see the Wiki) and in your case just use your boolean flag to have the callback return true or false (the later will disable/remove all checkboxes)
QUESTION
Is there a way to filter on multiple columns with angular-slickgrid ?
I have columns showing the same information in different regions, and I'd like the user to be able to use one filter to get any row matching regardless of which region (column) matches.
Thanks
...ANSWER
Answered 2021-Aug-11 at 16:10The short answer is No you cannot (but there's a longer Yes option below), there's a reason why each filter are shown on top of each column and it's because they are associated with that said column (by looping through each column definition, these filters are being created). You can however use another column when filtering, with queryFieldFilter
or with queryFieldNameGetterFn
depending on the data but again it's only associated to 1 column at a time.
Does that mean that you cannot do it at all? Not necessarily, you could provide a different filter
implementation via the SlickGrid DataView dataView.setFilter(myFilter);
but if you do that then you'll bypass all the column filters (in other words, none of the column filters would work anymore when you override the DataView filter method) but maybe that is acceptable for you by making it as a global filter. You can take this SlickGrid Example to see the code, it has an external filter with multiple conditions and that might work for you.
QUESTION
my first questions so accept my apologies if I do sth wrong ;-)
I am creating an web-app which is using angular-slickgrid Tree so show some data from a database. Creating the Tree itself is working and I am getting those data in the frontend by using a promise to get them from backend and therefore from my db. For that I in particular expanded this "Example 29: Tree Data (from a Hierarchical Dataset)" of angular-slickgrid. My version of this is 2.30.2, Angular Version is 11.2.12 and Typescript 4.1.
My problem is, that those data do not show up automatically in the tree, but just after I click on the row header... so those data arrive frontend indeed! Unfortunatly I could not find out which event is exactly triggered (looked in web debugger and inspector).
I was said, actually it should work just by giving my db-data to the so called "datasetHierarchical" varible (after they arrived in the frontend) since there is an assignment in the html '[datasetHierarchical]="datasetHierarchical"'. For mocks directly in the Tree-Component this is working. But in my case with data from a db this does not work as well as all methods I tried like 'this.angularGrid.sortService.sortLocalGridByDefaultSortFieldId();' or 'this.angularGrid.gridService.invalidateHierarchicalDataset(this.datasetHierarchical);', which I thought should re-render the Tree-Grid after my data arrived frontend.
It is kind of frustrating that such a trivial thing does not work but maybe does someone else see (a simple) solution I oversaw... So thanks for any help in advance! :-)
And the data request is also quite simple:
...ANSWER
Answered 2021-Jul-14 at 07:32Thanks for help, but I found a solution after I looked closely in the lib. I guess a timeout is not working right, so I added one after my data arrived from DB:
QUESTION
I have installed latest version of angular-slickgrid in Angular 11 project. After ng build
, I have started getting these errors in d.ts
files.
Could you please help me with the same?
Below are the logs from build :
...ANSWER
Answered 2021-Feb-23 at 05:22Apparently slickgrid code doesn't work well with angular strict mode https://angular.io/guide/strict-mode. You might want to disable it in tsconfig.json.
QUESTION
this.columnDefinitions = [
{
id: 'edit',
field: 'id',
excludeFromColumnPicker: true,
excludeFromGridMenu: true,
excludeFromHeaderMenu: true,
formatter: Formatters.editIcon,
minWidth: 30,
maxWidth: 30,
onCellClick: (e: Event, args: OnEventArgs) => {
this.router.navigate(['/transaction/transaction-detail/' + args.dataContext.id]);
}
},
{ id: 'cin', field: 'customer.cin', name: 'CIN', filterable: true, sortable: true, formatter: Formatters.complexObject },
{ id: 'branch', field: 'branch.name', name: 'Branch', filterable: true, sortable: true, formatter: Formatters.complexObject },
{ id: 'valueDate', field: 'valueDate', name: 'Transaction Date ', dateFormat: 'DD-MM-YYYY'},
{ id: 'amount', field: 'amount', name: 'Amount', sortable: true, maxWidth: 200, type: FieldType.number, filter: { model: Filters.inputNumber } },
];
...ANSWER
Answered 2021-Jan-10 at 05:03The best and easiest way to manipulate data in angular is by pipes.
QUESTION
I have downloaded source code from here. I have checked demo but single select dropdown functionality not implemented anywhere. so i have modified code for last row "completed". Because i want to implement dropdown functionality on cell edit. following are code changes in existing source code for single select dropdown.
...ANSWER
Answered 2021-Feb-17 at 14:32It looks like there's a lot of misunderstanding of how to use the code and some of the terms used.
First, there is already a single select dropdown editor, there is no need to create another one. All the Editors are shown in Example 3, the single select editor is on the "% Complete" column. All you need is this piece of code
QUESTION
is it possible to update the options showPreHeaderPanel
and createPreHeaderPanel
by clicking a button. I tried to modify this.gridOptions
and I tried to use this.angularGrid.slickGrid.setOptions
but the grid doesn't update it.
ANSWER
Answered 2020-Dec-16 at 13:56Note that I'm the author of Angular-Slickgrid and I did not try the code below but I expect it to work.
First of, you should also define a height with preHeaderPanelHeight
(default is 25) and then you assume that the option will redraw the grid and everything and that is where you misunderstand how it works, it's just an option it doesn't do anything by itself. It should work if you first create the preheader in your grid options but just don't show it if you don't want it to show up at first and then later you call the method to toggle its visibility which is setPreHeaderPanelVisibility
QUESTION
I am using Angular verion 11 and Angular-Slickgrid version 2.23.0
I added a drop down box filter in Angular-Slickgrid. The filter function works with no problem, but each time I click the filter, an extra drop down box appears below the grid, and it does not go away until I refresh the page.
If I keep clicking the filter, more and more extra drop down boxes appear on top of each other. It looks like only one extra box on the web page, but when I open the html elements, I can see a list of drop down elements generated.
I check Angular-Slickgrid official demo page about filter, each time when I click the filter, there is a drop down element generated at the bottom of the html page with a position, when I click the filter again, the drop down element disappears. This is the way it should work, but the drop down box element does not disappear when I click the filter.
Please see the source code below. During debug I remove all unnecessary code to keep only one column left, but the problem still exist. This problem exists in all drop down box filters in my project. Other filters with only text works well.
Thanks a lot for help.
...ANSWER
Answered 2020-Nov-24 at 13:21For whoever have this problem, it was discussed outside of here and it turned out to be because there was multiple body
in the page. The explanation of why this is problem, Angular-Slickgrid uses multiple-select.js
external library and the drop-down is actually position under the Filter input, when we say (position) we really mean re-position (by absolute position) of the drop list is moved under the input and in Angular-Slickgrid we use the container as body
because that is the only way to make it show over everything else, hence there can only be one body
for this to work properly.
The default multiple-select options used by Angular-Slickgrid are
QUESTION
When searching the data in the filter I want to show "No data to display" when search results with empty dataset
ContextWhen searching the data in the filter I want to show "No data to display" when search results with empty dataset
Expected Behaviorshow "No data to display" Message instead of empty one
Current BehaviorIt shows empty
EnvironmentAngular - 8.2.14, Angular-Slickgrid - 2.22.4 ,TypeScript - 3.7
...ANSWER
Answered 2020-Nov-18 at 15:20This is now part of Angular-Slickgrid (since version 2.23.1
) and is enabled by default, you can also disable it with the flag enableEmptyDataWarningMessage
. There are also few options you can provide with the new property emptyDataWarning
Grid Options (see EmptyWarning interface for more info)
I also did not use the code shown with the absolute positioning since that was causing issues, instead the approach is to search for the DOM element with class of .grid-canvas
and append a
It's not possible in SlickGrid, it will only displays data that must fit in the cells.
However you have other alternatives, I think the best you can do is to display your text in a span in the middle (or top) of the grid. You can take a look at the SlickGrid Example - Yahoo Search it shows the "Buffering..." in the middle of the screen. The final piece is to know when to display it, you can use the DataView onRowCountChanged
event, which will provide you the item count.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install Angular-Slickgrid
Refer to the Wiki - HOWTO Step by Step and/or clone the Angular-Slickgrid Demos repository. Please don't open any issue unless you have followed these steps (from the Wiki), and if any of the steps are incorrect or confusing, then please let me know. NOTE: if you have any question, please consider asking installation and/or general questions on Stack Overflow. You might notice that all demos are coded with mocked dataset in each of the examples, that is mainly for demo purposes, but you might be wondering how to connect this with an HttpClient? Easy... just replace the mocked data, assigned to the dataset property, by your HttpClient call it and that's it. The dataset property can be changed or refreshed at any time, which is why you can use local data and/or connect it to a Promise or an Observable with HttpClient (internally it's just a SETTER that refreshes the grid). See Example 24 for a demo showing how to load a JSON file with HttpClient.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page