Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added additional events when selecting/deselecting rows #1457

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ppowalla
Copy link

Added following events:

beforeRowSelected: function (event, $row) { },
rowSelected: function (event, $row) { },
beforeRowDeselected: function (event, $row) { },
rowDeselected: function (event, $row) { }

the before-events can be canceled to stop selecting/deselecting rows

Added „deselectRows“-method.

Added following events:

beforeRowSelected: function (event, $row) { },
rowSelected: function (event, $row) { },
beforeRowDeselected: function (event, $row) { },
rowDeselected: function (event, $row) { }

the before-events can be canceled to stop selecting/deselecting rows

Added „deselectRows“-method.
@marc-dev0
Copy link

Hi @ppowalla,
I triying to use delectRows like :
var $r = $('#StudentTableContainer').find('.jtable-data-row')
var record = $(this).data('record');
$.each($r, function (i, record) {
$('#StudentTableContainer').jtable('deselectRows', record.idEstudiante);
});
An error show me : "no such method 'deselectRows' for jtable widget instance"
Can you help me please. I searching that user press on the event click of a button, selected rows are deselected.

@ppowalla
Copy link
Author

Hi proLETARI,

I guess that my contribution is not available in the current release version, that is why you are not able to call this method. You would need to ask the jtable developer directly to figure out if this change will make it into the core code.

Bye

@marc-dev0
Copy link

@ppowalla

Thanks for reply, i ajust that code like this:
var $r = $('#StudentTableContainer').find('.jtable-data-row')
var record = $(this).data('record');
$.each($r, function (i, record) {
$r.removeClass('jtable-row-selected ui-state-highlight');
$r.find('>td.jtable-selecting-column >input').prop('checked', false);
});
if someone have the same problem.
Thanks for your contribution to jtable.
Un abrazo.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants