Ngx datatable get selected row

GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account.

Using ngx-datatable I did read and learn from issue ; the defect is still there. I avoided this problem by running through my rows and setting an index property on them. Abominable, but it works. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Sign up. New issue. Jump to bottom. Copy link Quote reply. I'm submitting a This comment has been minimized.

Sign in to view. Got the same issue. CalamityCodes mentioned this issue Nov 6, Fixed datatable-row-wrapper getRowIndex Arg Can we get this merged please? Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment. Linked pull requests. You signed in with another tab or window. Reload to refresh your session.

You signed out in another tab or window. Reproduction of the problem Use the above snippet.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. Current behavior select operation in ngx-datatable does not work although activate works properly.

Table version: 9. This is similar to the way angular specifies a string literal in the layout. Give that a try and note that it applies in all cases where you are assigning a string rather than the value of a variable, so as you have done for [columnMode]. I can confirm that dannyvenier solution works. I forgot to add the single quotes in the [selectionType] property.

Probably should notify that no selectionType if someone subscribed to the click events. Am i missing something? Thanks my dear friend dannyvenier. Yesit needs single quotes, it works.

Subscribe to RSS

Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Sign up. New issue. Jump to bottom. Labels Needs Demo. Copy link Quote reply. I'm submitting a NoData'totalMessage: this. Please tell us about your environment: Table version: 9.

This comment has been minimized. Sign in to view. Can you make a demo please? I am also facing same problem. Select Row operation not working. Nevermind, fixed it by copying from the selection examples.

Don't know what i did wrong though. Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment. Needs Demo.Method used for setting column widths. Distributes based on widths. Uses flex-grow API. Distributes proportionally. Array of columns to display.

ngx datatable get selected row

Total count of all rows. Default value: 0. Use external paging instead of client-side paging. Default value: false. Use external sorting instead of client-side sorting. The height of the footer in pixels. Pass a falsey for no footer. The height of the header in pixels.

Ngx-datatable with Angular 4/5/6 Example

Pass a falsy value for no header. Default value: Static messages in the table you can override for localization. Page size to show. Default value: undefined. Show the linear loading bar. Current offset page - 1 shown. Default value: true. Swap columns on re-order columns or move them. The height of the row.

When virtual scrolling is not in use, you can pass undefined for fluid heights. If using virtual scrolling, you must pass a function or a number to calculate the heights. Using a function, you can set the height of individual rows:. Function for uniquely identifying a row, used to track and compare when displaying and selecting rows.

Array of rows to display. Use horizontal scrollbar. Use vertical scrollbar for fixed height vs fluid. This is necessary for virtual scrolling. A boolean or function you can use to check whether you want to select a particular row based on a criteria. Function to determine whether to show a checkbox for a row. List of row objects that should be represented as selected in the grid. Rows are compared using object equality.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. Current behavior Selected column in single select mode is blue.

Data Table with Bootstrap 4 (Full Featured)

Didn't find any css class to overwrite in DOM explorer. Expected behavior There should be a "selected" class on the datatable-body-row. Customizing the css. Somewhere you set this classes, which can be pretty easy used to set a background color:.

Any progress? Even when using the enormously specific CSS selector above I wasn't able to change the BG color from the default blue. Suggested workarounds? Just ran into this myself. My use-case is that I essentially want to remove the added "active" class, but have the rest of the changes propagated. I tried the following:. The CSS changes are applied, but unfortunately the inherited colour is still the same as it's set further up the chain.

If I try to set a specific colour, it remains blue. I expect there's an animation going on somewhere? The following selector works in the latest version - this removes the colour entirely and uses the row-striping if it's turned on:. Thx Bidthedog that helped. I just added EEE color for hovered rows, cause inherit left white for me on hovers.

Get selected items

Bidthedog Is it still working?? Because my rows are still blue on click. Bidthedog Not working for me then. Hello, is there any progress on that? Currently I've tried all above but non of them works for me:. Hi, I am new to using the grid and I have a question. I know that by using rowClass, we can dynamically pick a class based on the state of the row.

Can I do the same for selected rows also? In other words, I want the selected row styling to also be dynamic based on the state of the row like that of a normal row styling. I also know that selected row styling can be set using that big css selected mentioned above. Can I combine the dynamic part of row styling and the styling of selected rows in some way, to get dynamic selected row styling? Also, I found Bidthedog and Reshad-A selectors worked for me if that's the solution people need.

Bidthedog Your selector did work for me, but i also came across this smaller one, which also seems to b working.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account.

ngx datatable get selected row

I am facing the same issue. WalkOffEarthosamasaeed Do you have a solution for this issue? Previously, I've used 9.

Before But now, it's gone Anybody found any alternatives to this? This is a crucial, software-breaking bug. Inlesco rowIndex works on version 9. I just updated to version 9.

ngx datatable get selected row

BearandYoon no, rowIndex does not work on 9. So which version should I use for a rowIndex? BearandYoon version Hi wizarrc rowIndex is working for me. I have another issue on ngx-datatable inline-editing. When I change first sub-row, second sub row also is changed.

I'd like to ask - how to get the index of a row now in the onSelect or any other callback's you provide for ngx-datatable component? Inlesco As far as I know, the maintainers of the project are the employees of the Swimlane company. I am working on a forked copy of the project for a personal project of mine, but right now I contribute some code fixes and have been answering some questions on here.

I've been arguing the same thing that you suggest with other callbacks.

ngx datatable get selected row

Refer here on a conversation I had about how to change the selected property and the corresponding event to be more useful. This is an open source project, so feel free to open up issues on here with bugs you find or feature requests you want.

Also, if you got value out of the project, consider forking the project and contributing changes for consideration by the project maintainers. That's what I did earlier this year. BearandYoon I have no idea. Do you have a plunker demo? Inlesco The reason there is no deprecation warning is:. I agree that the correct move for such limiting factors was to make a clean break. I had to work around this issue by creating a hidden column and copying the rowIndex into that column.

It's hacky and I'd appreciate having rowIndex in rowDetails back. Skip to content. Dismiss Join GitHub today GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

Sign up. New issue. Jump to bottom.I have been searching for a best datatable with features like sorting, searching, pagination, rows per page etc. I am a big fan of datatables. Datatable which I am using now:. Why I am using ngx-datatable? If you are facing any issue while installing, feel free to check the below posts to resolve those errors. To install angular-cli in windows:.

Getting the entered value, converting to lowercase and filtering with the backup cache store array and assigning it back to store array which we used in the template html file. Hi Gupta, I have already shared the code in the post. Can you tell me what else you are looking for? Can you please tell me how can I do? Thanks for visiting our site. Hope you got some idea! Thanks for the reply. I hope you understand my problem. Please drop an email with your code snippets and issue details to mirthbees gmail.

Your email address will not be published. Notify me of follow-up comments by email. Notify me of new posts by email. This site uses Akismet to reduce spam. Learn how your comment data is processed. July 8, AngularFrameworks. Table of Contents.GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together. Have a question about this project?

Sign up for a free GitHub account to open an issue and contact its maintainers and the community. Already on GitHub? Sign in to your account. What is the current behavior? What is the new behavior? This allows you to get the row index of the selected row when a row is selected. If this PR contains a breaking change, please describe the impact and migration path for existing applications I originally thought it would be good to offer a helper function that one could call to determine the row index, but since that is more of an anti-pattern, I feel that it's better to change selected to be number[] instead.

The user already has access to the rows array so it should be no problem, other than being a breaking change. My suggestion is to instead make the select event and selected input instead be of type number[] where it would return an array of row indexes and not the view index or even sorted index.

I spoke about my suggestion here in more detail. Ya, I have to agree its kind of misleading. I think the best way would be to get the row index yourself.

I think I know what you're trying to do, I'd suggest something like this:. Actually what I am doing is making it so when you select the row, output on table of selectthat it will change all the cells in the row to be editable at once, while leaving the other rows in the table alone. This was a work around to make it so I could do similar.

Your this. If a keyboard button such as shift was pressed when activated, it would add multiple selections, yet only report one value and not even accurate one.


Replies to “Ngx datatable get selected row”

Leave a Reply

Your email address will not be published. Required fields are marked *